Skip to content

Instantly share code, notes, and snippets.


A Flow of Code AFlowOfCode

View GitHub Profile
AFlowOfCode / decrypt_devise_cookie.rb
Created Jan 15, 2019
Decrypts a Rails (Devise/Warden) cookie in ruby
View decrypt_devise_cookie.rb
AFlowOfCode / extension-autobuild.bat
Created Oct 17, 2019
Batch file to automatically create uploadable zip packages for a browser extension written for both Firefox and Chrome. See this repo for an example where this would be useful:
View extension-autobuild.bat
REM requires 7zip -
REM run this from the parent folder of the extension directory
REM excludes .git folder & other browser's manifest by default
REM change path to 7z.exe & the extension directory as needed
REM Firefox
rename "%CD%\extension\manifest-firefox.json" manifest.json
"%PROGRAMFILES%/7-zip/7z" a .\extension\* -xr!.git -xr!manifest-chrome.json
rename "%CD%\extension\manifest.json" manifest-firefox.json
AFlowOfCode / decrypt_devise_cookie.php
Created Jan 15, 2019
Decrypts a Rails (Devise/Warden) cookie in PHP
View decrypt_devise_cookie.php
AFlowOfCode /
Created Apr 24, 2018
Simple bash script to update & restart a rails app on a live dev server when triggered by a webhook set to repo push. Args to script are:,,
echo "commit: $1 by: $2 $3"
cd your/git_rails/project_root #REPLACE THIS
git pull
if [ -f tmp/pids/ ]; then
echo "killing rails server"
kill -9 $(cat tmp/pids/
bundle install
rails db:migrate RAILS_ENV=development