Unfollow all users you follow in Twitter/Cleanup the twitter

Actually I wasn’t using my twitter account for past 4 to 5 months. Suddenly when i opened I got pissed of seeing some random news in some language along with my feed. When i checked my profile, I was subscribed to some 2000 users and groups which i don’t even remember doing.

Now to cleanup this, the only option I see in twitter page was to unfollow each one. Seriously unfollow 2000 users one by one??

Then on google I found some solutions, half of which didn’t work for me. I am adding the one worked for me below here:

  1. Go to the page that show list of users you are following from profile ( profile -> following)
  2. Scroll down  the list till end
  3. press shift+ctrl+i
  4. In console type $(‘.button-text.unfollow-text’).trigger(‘click’)

Note: I did it in batches as my list was more than 2000 and it was throwing error for me.

ReactJs – Experiments for start

ReactJS:

  1. Component Based ( not  MVC – https://medium.com/@dan.shapiro1210/understanding-component-based-architecture-3ff48ec0c238)
  2. Virtual DOM

Used create-react-app for my experiments as a start ( source code for create-react-app : https://github.com/facebookincubator/create-react-app)

sudo npm install -g create-react-app

Create React App doesn’t handle backend logic or databases; it just creates a frontend build pipeline, so you can use it with any backend you want. It uses build tools like Babel ( a compiler ) and webpack (a bundler ) under the hood, but works with zero configuration

Create a new react project:

create-react-app my-app ( This will install react, react-dom, and react-scripts. Difference for react and react dom is explained http://stackoverflow.com/questions/34114350/react-vs-reactdom)

cd my-app ( The folder structure is as below)

s1

npm start (This will start the server at port 3030 and app is available at http://localhost:3000/)

helloworld

Code is available in https://github.com/remyaraj/reactexperiments

 

Working:

  1. In the public folder you will see an index.html which is hit on loading url localhost:3000
  2. In the body of html file there is a div with id “root”.indexhtml
  3. Webpack bundles and keeps a file called index.js in src folder. U can find the below           code in it

ReactDOM.render(
<App />,
document.getElementById(‘root’)
);

The above line instruct to replace the root element with whatever is returned by the render function of  App Class.

JavaScript – Learning notes – part 1

Values:

  • Data types
  • Numbers, strings, boolean, objects, functions, undefined values

  1.  Numbers: numeric values. Fixed number of bits of 64 for representation(2^64 different numbers). 3 Special numbers are infinity, -infinity, NaN( Not a Number)
  2. Strings: represented with single or double quotes. \ is used for escaping character.
  3. Boolean: true or false
  4. Undefined values: null and undefined.

    Operators:

    1. Arithmetic operators: +,-,/,*,%
    2. Unary operators: typeof, !
    3. Logical operators: &&, ||
    4.  Conditional operators: ?:(ternary operator)

    Type Conversion:

    * When an operator is applied to the wrong type of value, JS will convert that value to the type it wants( Type Coercion ) 

    Eg: 8*null -> 0

            “5” – 1  -> 4