Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Focusing

souhaiebtar

:octocat:
Focusing
View GitHub Profile
@somerandomnerd
somerandomnerd / EnableNaturalScrolling.scpt
Last active Mar 25, 2018
Quickly Enable/Disable natural scrolling on OSX
View EnableNaturalScrolling.scpt
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.trackpad"
end tell
tell application "System Events"
tell process "System Preferences"
click radio button "Scroll & Zoom" of tab group 1 of window "Trackpad"
set theCheckbox to checkbox 1 of tab group 1 of window "Trackpad"
@fideloper
fideloper / vim_tmux_setup.sh
Last active Jul 15, 2018
Setup Vim+Vundle+Solarized+Tmux in a Vagrant Ubuntu box. This goes with my article on Vim+Tmux here: http://fideloper.com/mac-vim-tmux
View vim_tmux_setup.sh
#!/usr/bin/env bash
# Bash script to automate Vim+Tmux install as written about here:
# http://fideloper.com/mac-vim-tmux
# Test if Git is installed.
# Installing Git is not the job of this script
git --version 2>&1 >/dev/null
GIT_IS_INSTALLED=$?
@salcode
salcode / dump-mamp-mysql-dbs.sh
Created Feb 21, 2014
Shell Script to dump all MAMP DBs into separate files
View dump-mamp-mysql-dbs.sh
# based on http://www.commandlinefu.com/commands/view/2916/backup-all-mysql-databases-to-individual-files
# but modified for the MAMP path and to include default root/root as username and password
for I in $(/Applications/MAMP/Library/bin/mysql -u root -proot -e 'show databases' -s --skip-column-names); do /Applications/MAMP/Library/bin/mysqldump -u root -proot $I | gzip > "$I.sql.gz"; done
@PedroHLC
PedroHLC / photoshop.pol.sh
Last active Apr 21, 2019
PlayOnLinux script for installing any photoshop version (x86) using winetricks
View photoshop.pol.sh
#!/bin/bash
# Create wineprefix using this script, install Photoshop, do not run it, then change wine version to '1.7.41-PhotoshopBrushes' emulating 'win7'
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
PREFIX='Photoshop'
WINEVERSION='1.9.3-staging'
TITLE='Adobe Photoshop'
EDITOR='Adobe Systems Inc.'
@BretFisher
BretFisher / docker-xenial-copy-paste.sh
Last active May 6, 2019
Install Docker PPA on Ubuntu 16.04
View docker-xenial-copy-paste.sh
# NOT FOR SHELL SCRIPT, but rather just for quick copy paste
# this is a copy-paste version with defaults of the full shell script docker-xenial.sh which is below this one in gist.
apt-get -y install apt-transport-https ca-certificates curl && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \
service lxcfs stop && apt-get remove -y -q lxc-common lxcfs lxd lxd-client && \
apt-get update -q && \
apt-get install -y -q docker-ce && \
printf '{ "userns-remap" : "default" , "storage-driver" : "overlay2" }' > /etc/docker/daemon.json && \
@abhiomkar
abhiomkar / rsync_copy.sh
Created Jun 25, 2011
Rsync - Copy files from remote server with Resume Feature
View rsync_copy.sh
rsync --partial --progress --rsh=ssh user@hostname:/path/to/file /local/destination/path
@wiledal
wiledal / shake.js
Created Mar 14, 2015
Simple shake animation for TweenMax (gsap.js). For modern form error feedback.
View shake.js
function shakeAnimation(element){
TweenMax.to(element, .1, {
x: -7,
ease: Quad.easeInOut
});
TweenMax.to(element, .1, {
repeat: 4,
x: 7,
yoyo: true,
delay: .1,
View install-parallels-tools-debian
$ su
$ umount /media/cdrom
$ mount /dev/sr0 /media/cdrom
$ cd /media/cdrom
$ ./install
@arvind-iyer
arvind-iyer / prezto.sh
Created Sep 28, 2016
Install prezto on ubuntu
View prezto.sh
#!/bin/bash
prezto.sh(){
clear
sudo apt-get install -y git
sudo apt-get update && sudo apt-get install -y zsh
# Get prezto
git clone --recursive https://github.com/sorin-ionescu/prezto.git ~/.zprezto
# Backup zsh config if it exists
@nknapp
nknapp / Dockerfile
Created Oct 30, 2016
Traefik setup as reverse-proxy with docker and letsencrypt
View Dockerfile
FROM traefik:camembert
ADD traefik.toml .
EXPOSE 80
EXPOSE 8080
EXPOSE 443
You can’t perform that action at this time.