Skip to content

Instantly share code, notes, and snippets.

bonyiii

Block or report user

Report or block bonyiii

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View emacs_ctags
#!/bin/sh
#ctags --tag-relative -e --exclude=.git --exclude=node_modules --exclude=storage --exclude=tmp -Rf
ctags --tag-relative -e -Rf TAGS --exclude=.git --exclude=node_modules --exclude=storage --exclude=tmp . $(bundle list --paths)
# https://github.com/syl20bnr/spacemacs/issues/2275
sed -ri '/^.{1000}/d' TAGS
#https://github.com/mmorearty/elixir-ctags
View gist:2b1cf68b7894846a9678
http://stackoverflow.com/questions/941594/understanding-the-rails-authenticity-token
https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When.3F
http://blog.codinghorror.com/protecting-your-cookies-httponly/
http://stackoverflow.com/questions/1177863/how-do-i-ignore-the-authenticity-token-for-specific-actions-in-rails
View gist:2135731
http://stackoverflow.com/questions/68569/text-watermark-on-website-how-to-do-it
<style type="text/css">
#watermark {
color: #d0d0d0;
font-size: 200pt;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
position: absolute;
width: 100%;
@bonyiii
bonyiii / gist:7439733
Last active Dec 28, 2015
opensuse 12.3 tmux.conf with working bash history xterm shortcuts for ctrl + Up/Down
View gist:7439733
~/.tmux.conf
set-option -g default-terminal xterm-256color
set-window-option -g xterm-keys on
# The key was that
echo $TERM
# in tmux returned screen which is why ctrl+up did not looked up history now it is
xterm-256color
Though it works fine on ubuntu with echo $TERM screen
View cucumber_hooks.rb
Before do |scenario|
DeferredGarbageCollection.start
end
After do |scenario|
DeferredGarbageCollection.reconsider
end
at_exit do
DeferredGarbageCollection.stop
@bonyiii
bonyiii / jobsworth i18n
Last active Dec 15, 2015
Jobsworth i18n
View jobsworth i18n
actions
activities
admin_stats
billing
common
companies
custom_attributes
customers
devise
email addresses
View vizsga
#define ENGINE_LEFT OUT_A
#define ENGINE_RIGHT OUT_C
#define ENGINE_BOTH OUT_AC
#define SENS_TOUCH IN_2
#define SENS_US_FRONT IN_3
#define SENS_US_LEFT IN_1
#define SENS_COLOR IN_4
int us_left_was, us_left_new;
View gist:4130303
git clone svn://host/repo --stdlayout
git co -b local_trunk trunk
# pull
git svn rebase
#push
git svn dcommit
View gist:4039677
Display what branch i'm on:
~/.bash_profile or .bashrc
export GIT_PS1_SHOWDIRTYSTATE=1
export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '
~/.gitconfig
[alias]
ci = commit
br = branch
@bonyiii
bonyiii / gist:3666732
Created Sep 7, 2012
javscript find duplicates
View gist:3666732
sorted = window.items.sort((a,b) -> a.track_id - b.track_id)
results = []
for item,i in sorted
if i < sorted.length - 1 && sorted[ i + 1 ].element_id == sorted[i].element_id
results.push sorted[i]
results
You can’t perform that action at this time.