View remove-all-followers.js
/**
* Removes all followers on Twitter, usually added by profile breach.
* Usage: just copy code bellow (triple click on line & CTRL+C ) to the
* Developer console in browser, press ENTER and watch them being deleted.
*/
setInterval(function(){t=$('.following').find('.follow-button');if(!t[0]){window.scrollTo(0,$(document).height());}else{console.log(t.attr('class')); t.trigger('click');}},100)
View dps.sh
## Always, before performing any installation, make sure that system is up to date:
# Freshen information on versions of system software packages
sudo apt-get update
# Perform upgrade of packages
sudo apt-get upgrade
# Perform upgrade of system (kernel)
sudo apt-get dist-upgrade
## Getting to know system
View logging_in.md

Order of script loading for interactive login shell

User can have multiple ways to login and different OSes, different shells have different approach. As I always search for same information, I decided to collect them here.

Ubuntu

To understand what's going on here, you need to understand a little background information about how shells (bash in this case) are run.

  • When you open a terminal emulator (gnome-terminal for example), you are executing what is known as an interactive, non-login shell.
  • When you log into your machine from the command line, via ssh, or run a command such as su username, you are running an interactive login shell.
View .gitconfig
[user]
name = MacMladen iMac
email = mladen@bluefish.rs
[color]
ui = on
[core]
excludesfile = /Users/mladen/.gitignore_global
whitespace= fix,-indent-with-non-tab,-indent-with-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore_global
[difftool "sourcetree"]
View .barracuda.cnf
###
### Configuration created on 151219-0247
###
_LOCAL_NETWORK_HN=""
_LOCAL_NETWORK_IP=""
_MY_FRONT="aegir.dx.rs"
_MY_HOSTN="dx.rs"
_MY_OWNIP="5.9.90.162"
_SMTP_RELAY_HOST=""
_SMTP_RELAY_TEST=YES
View phjs-screencapture.js
// Copyright: (C) 2015 MacMladen <macmladen@gmail.com>
// License: GPL-2.0
// Prequisite:
// having installed phantomjs from http://phantomjs.org
// You have to change variables to suit your needs
// Usage:
// $ phantomsj script.js
// it will produce capture file in same folder
// you can figure out the rest ;)
var
View drush-si.sh
dr si standard \
--account-mail=lucar_loc@bluefish.rs \
--account-name=admin \
--account-pass=plavac \
\
# --db-su=lokalni \
# --db-su-pw=lokalni \
--db-url=mysql://lokalni:lokalni@localhost/lucar \
# --locale=<en-GB> \
\
View .gitconfig
[user]
name = MacMladen iMac
email = mladen@bluefish.rs
[color]
ui = on
[core]
excludesfile = /Users/mladen/.gitignore_global
whitespace= fix,-indent-with-non-tab,-indent-with-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore_global
[difftool "sourcetree"]
View bash_functions.sh
# promptyn "{message}" {default_answer}
# $1 "{message}" like "Do you wish to procede? [Yn]"
# $2 {default_answer} you can pass default value, just notify that in message above
# @return
# 0 for any of y, Y, yes, YAYA, yabbadabbadoo
# 1 for any of n, N, Nein, nikako, nonononoooo
promptyn() {
while true; do
read -p "$1 " yn
CHOICE=${yn:0:1}
View git-merged-remove.sh
#!/bin/sh
# Taken from and modified
# http://devblog.springest.com/a-script-to-remove-old-git-branches/
echo "The following remote branches are fully merged into master and will be removed:"
git branch -r --merged master | sed 's/ *origin\///' | grep -v 'master$'
read -p "Continue (y/n)?"
if [ "$REPLY" == "y" ] ; then # Remove remote fully merged branches
git branch -r --merged master | sed 's/ *origin\///' | grep -v 'master$' | xargs -I % git push origin --delete %