Skip to content

Instantly share code, notes, and snippets.

View swapab's full-sized avatar
🥌
I may be slow to respond.

Swapnil Abnave swapab

🥌
I may be slow to respond.
View GitHub Profile
@andrebq
andrebq / braking.md
Created March 20, 2019 09:08
Fahrschule

Braking

Standard Braking Distance

  • DE: (Geschwindigkeit / 10) * (Geschwindigkeit / 10)
  • EN: (Speed / 10) * (Speed / 10)

Evasive (Emergency) Braking Distance

  • DE: ((Geschwindigkeit / 10) * (Geschwindigkeit / 10)) / 2
  • EN: ((Speed / 10) * (Speed / 10)) / 2
@jclosure
jclosure / gist:2732898f35adaf4a8bb79f7805bc7d87
Created May 2, 2016 04:06
install emacs 24.5 from src on Centos 6
yum install gcc make ncurses-devel
yum install giflib-devel libjpeg-devel libtiff-devel -y
cd /usr/local/src
wget http://ftp.gnu.org/pub/gnu/emacs/emacs-24.5.tar.gz
tar xzvf emacs-24.5.tar.gz
cd emacs-24.5
./configure --without-x --without-selinux
make && make install
which emacs
emacs --version
wget http://mirror.sdunix.com/gnu/emacs/emacs-24.5.tar.gz
tar zxvfp emacs-24.5.tar.gz
cd emacs-24.5/
./configure
sudo yum -y install libXpm-devel libjpeg-turbo-devel openjpeg-devel openjpeg2-devel turbojpeg-devel giflib-devel libtiff-devel gnutls-devel libxml2-devel GConf2-devel dbus-devel wxGTK-devel gtk3-devel
./configure
make
sudo make install
@thebucknerlife
thebucknerlife / authentication_with_bcrypt_in_rails_4.md
Last active January 17, 2024 23:54
Simple Authentication in Rail 4 Using Bcrypt

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps

@corvax19
corvax19 / openssh-encrypt-decrypt.txt
Last active July 28, 2023 14:10
[/linux/openSSL] Simple text #encryption/#decryption with #openssl
echo -n "That's the text"|openssl enc -e -aes-256-cbc -a
Encrypt with interactive password. Encrypted message is base64-encoded afterwards.
echo -n "That's the text"|openssl enc -e -aes-256-cbc -a -k "MySuperPassword"
Encrypt with specified password. Encrypted message is base64-encoded afterwards.
echo "GVkYiq1b4M/8ZansBC3Jwx/UtGZzlxJPpygyC"|openssl base64 -d|openssl enc -d -aes-256-cbc
Base-64 decode and decrypt message with interactive password.
echo "GVkYiq1b4M/8ZansBC3Jwx/UtGZzlxJPpygyC"|openssl base64 -d|openssl enc -d -aes-256-cbc -k "MySuperPassword"
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@marcinbunsch
marcinbunsch / codewall.badges.js
Created March 10, 2012 22:18
Coderwall - display missing badges
// How to use this:
// 1. Go to the desired profile page on coderwall, like http://coderwall.com/marcinbunsch
// 2. Paste this gist in the JS console
//
// You can also probably use this in greasemonkey and dot.js
//
// Also, it was tested in Chrome, Firefox and Safari, it probably will
// not work in IE, but I just don't care about it ;)
//
// UPDATE: Coderwall made changes to the site and I cannot retrieve the achievements, so they are hardcoded, taken from a cached version of the achievements page