Skip to content

Instantly share code, notes, and snippets.

View omgitsads's full-sized avatar
:shipit:

Adam Holt omgitsads

:shipit:
View GitHub Profile
set nocompatible " be iMproved, required
filetype off " required
set backspace=indent,eol,start
call plug#begin('~/.vim/plugged')
Plug 'airblade/vim-gitgutter'
Plug 'editorconfig/editorconfig-vim'
Plug 'itchyny/lightline.vim'
Nein, ich verstehe Sie nicht.
Nein, ich sehe ihn heute nicht, aber morgen.
Nein, ich leibe sie nicht.
Ja, ich liebe ihn.
Ja, ich liebe es sehr.
Ja, euch liebe ich auch.
Nein, ich sehe euch nicht.
Nein, ich beleigte er nicht.
Ja, ich sehe es.

Keybase proof

I hereby claim:

  • I am omgitsads on github.
  • I am omgitsads (https://keybase.io/omgitsads) on keybase.
  • I have a public key ASBnFBhAYzqSSh15QmrS4q9HIQlTm8cKopYd-sJf54W_FAo

To claim this, I am signing this object:

@omgitsads
omgitsads / add-new-primary-email.rb
Created August 2, 2018 12:20
Add new primary email address to a user
#!/usr/bin/env ruby
require 'rubygems'
require 'octokit'
Octokit.configure do |c|
c.api_endpoint = ENV['GITHUB_API']
end
# Create Admin Client with PAT with site_admin scope.
admin_client = Octokit::EnterpriseAdminClient.new(

Keybase proof

I hereby claim:

  • I am omgitsads on github.
  • I am omgitsads (https://keybase.io/omgitsads) on keybase.
  • I have a public key whose fingerprint is 9C03 1623 0D74 984C C101 F754 941E F195 3203 A4B6

To claim this, I am signing this object:

set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
set-option -g status on
set-option -g status-interval 2
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/.tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/.tmux-powerline/powerline.sh right)"
set -g status-bg black
module StringTest
def hello
"hello"
end
end
class String
include StringTest
end
@omgitsads
omgitsads / rails-check.sh
Last active December 10, 2015 22:38
Look for affected versions of rails, and if they have been patched or not
for i in `find /data -maxdepth 1 -type d ! -name "monit.d" ! -name "nginx" ! -name "lost+found" ! -name "homedirs" ! -name "data"`;
do
appname=`echo ${i} | awk -F/ '{print $3}'`
version=''
if [ -f $i/current/Gemfile.lock ];
then
version=`egrep "^ *rails \([0-9\.]+\)" $i/current/Gemfile.lock | egrep -o "[0-9\.]+"`
else
version=`gem list | egrep -o "^rails \([^,\)]+" | egrep -o "[0-9\.]+"`
@omgitsads
omgitsads / before_compile_assets.rb
Created December 3, 2012 13:17 — forked from ilyakatz/before_compile_assets.rb
Selective compilation
last_revision = run "cat #{current_path}/REVISION"
assets_modified = run "git diff --name-only #{last_revision} | grep '/assets/' | wc -l"
if assets_modified.output.to_i > 0
info "#{assets_modified} asset files changed detected. Compiling assets"
cd #{release_path} && PATH=#{release_path}/ey_bundler_binstubs:$PATH #{config.framework_envs} rake assets:precompile RAILS_GROUPS=assets"
else
info "No asset changes detected. Copying assets from previous"
current = shared_path + '/assets'