Skip to content

Instantly share code, notes, and snippets.

View franciscocpg's full-sized avatar

Francisco Guimarães (chico) franciscocpg

View GitHub Profile
@franciscocpg
franciscocpg / README.md
Created September 5, 2017 01:42
SQL Server enable/disable query plan

Use OFF to disable

SET SHOWPLAN_TEXT ON;
SET SHOWPLAN_ALL ON;
SET SHOWPLAN_XML ON;
SET STATISTICS PROFILE ON;
SET STATISTICS XML ON; 
@franciscocpg
franciscocpg / README.md
Created September 1, 2017 14:16
Arch increase max user watches

echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system

@franciscocpg
franciscocpg / remount.sh
Created September 1, 2017 01:21 — forked from ertseyhan/remount.sh
Temporarily increase size of tmp folder on Arch linux
#!/bin/bash
sudo mount -o remount,size=10G,noatime /tmp
echo "Done. Please use 'df -h' to make sure folder size is increased."
@franciscocpg
franciscocpg / README.md
Created August 31, 2017 18:56
Conky dual monitor
  1. Add xinerama_head = 1, to conky.config inside ~/.config/conky/conky.conf file.
  2. Every time a monitor is connected/disconnect rerun conky: pkill conky && conky
@franciscocpg
franciscocpg / README.md
Last active August 26, 2017 12:40
Writing to apex handle
  1. Creates a fifo
mkfifo apexfifo
cat > apexfifo &
catpid=$!
echo "catpid $catpid" 
  1. Start program using fifo: ./main < apexfifo
@franciscocpg
franciscocpg / README.md
Created August 25, 2017 10:38
Proxy bypass with tor and proxychains
  1. Install tor (eg debian: sudo apt-get install tor)
  2. Install proxychains (eg debian: sudo apt-get install proxychains)
  3. sudo nano /etc/proxychains.conf comment line strict_chain and uncomment line dynamic_chain. Add this to the end of file: socks5 127.0.0.1 9050 and save it.
  4. Start tor service (eg systemctl: sudo systemctl start tor)
  5. Enable tor service on boot (eg systemctl: sudo systemctl enable tor)
  6. Start any application with proxychains. For example proxychains firefox and then go to URL http://www.showmyip.gr. Your IP should me mascarade.
@franciscocpg
franciscocpg / README.md
Last active February 12, 2024 18:45
Install warsaw - itau arch linux
  1. Make sure firefox is already installed
  2. run yaourt -S warsaw (don't use root)
  3. Enable service: sudo systemctl enable warsaw.service
  4. Restart machine (for me it only works after I've restarted the machine)

Workaround to fix latest problems

cd /usr/local/lib/warsaw
sudo rm ld-linux-x86-64.so.2; sudo ln -s /usr/lib/ld-linux-x86-64.so.2 .
@franciscocpg
franciscocpg / README.md
Last active August 10, 2017 11:19
STF Arch install instructions (local mode)

All the necessary packages exists at pacman repositories, so:
sudo pacman -Su rethinkdb graphicsmagick zeromq protobuf yasm pkg-config

Probably npm install -g stf won't work on linux because of non-root restrictions.
If you try sudo npm install -g stf you'll get in trouble too.
So the solution is nvm. After installing it run:
nvm exec v7.10.0 npm install -g stf

@franciscocpg
franciscocpg / install.sh
Last active August 31, 2017 18:39
terminator enable emoticon arch linux (install font)
sudo pacman -S ttf-symbola
@franciscocpg
franciscocpg / install-docker-machine.sh
Last active May 10, 2017 19:18
Install docker machine on linux
#!/bin/bash
set -e
sudo sh -c "curl -L $(curl -s https://api.github.com/repos/docker/machine/releases/latest | grep 'browser_' | cut -d\" -f4 | grep Linux-x86_64) > /usr/local/bin/docker-machine"
sudo chmod +x /usr/local/bin/docker-machine