Skip to content

Instantly share code, notes, and snippets.

🐊

Kirk Elifson kirkelifson

🐊
Block or report user

Report or block kirkelifson

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
@kirkelifson
kirkelifson / keybase.md
Created Jan 12, 2015
Keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am kirkelifson on github.
  • I am kirkelifson (https://keybase.io/kirkelifson) on keybase.
  • I have a public key whose fingerprint is 7C6C 9C5D 6CCA 5950 D216 627C 8825 A623 5817 B4C8

To claim this, I am signing this object:

@kirkelifson
kirkelifson / all_nil.rb
Created Nov 6, 2015
rails: all_nil? -- returns true if list of object attributes are nil
View all_nil.rb
def all_nil?(object, *options)
options.map { |item| object.send(item) }.compact.empty?
end
@kirkelifson
kirkelifson / cygwin-rvm.md
Last active May 9, 2019
RVM Install on Windows
View cygwin-rvm.md

Do you have spaces in your Windows username?

  1. Create a new account on Windows without a space.

#Installation

  1. Download cygwin from http://cygwin.com
  2. Run setup-(x86|x86_64).exe
  3. Click next until selecting repo to download packages
  4. Choose http://cs.vt.edu (gotta go fast), click next
View resume.tex
% Document settings
% ===
\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{green}
\usepackage{ulem}
\usepackage[top=12mm,left=12mm,right=12mm,bottom=12mm]{geometry}
% Header
% ===
@kirkelifson
kirkelifson / generate_params.rb
Created Jan 28, 2016
Generates a list of params straight from the database schema
View generate_params.rb
#!/usr/bin/env ruby
# Usage: generate_params.rb [/path/to/db/schema.rb] [table name]
# By: Kirk Elifson <kirk [at] parodybit [dot] net>
def print_usage
puts "", "\tUsage: ruby generate_params.rb /path/to/db/schema.rb table_name", ""
exit
end
print_usage if ARGV.length != 2
@kirkelifson
kirkelifson / meta.rb
Created Feb 20, 2016
Map relation containing id and model to instances
View meta.rb
# Example:
# approvable_id = 7
# approval_type = "Finding"
# Finding.find(7) is yielded
Approval.pluck(:approvable_id, :approvable_type).sort.uniq.map { |id, type| Object.const_get(type).find(id) }.count
@kirkelifson
kirkelifson / select_columns.rb
Created Jul 10, 2016
Selects all column names containing phone and not containing type
View select_columns.rb
phones = Model.attribute_names.select { |c| c.include? 'phone' }.reject { |c| c.include? 'type' }.map(&:to_sym)
@kirkelifson
kirkelifson / signalflare-update.rb
Last active Dec 1, 2016
Quick update to signalflare using API v4 wrapper
View signalflare-update.rb
require 'rubyflare'
ip = { content: `curl -s https://ifconfig.co`.chomp }
zone_name = "parodybit.net"
hostnames = ['host1.parodybit.net', 'host2.parodybit.net', 'host3.parodybit.net']
email = 'EMAIL-HERE'
api_key = 'API-KEY-HERE'
cloudflare = Rubyflare.connect_with(email, api_key)
zone_id = cloudflare.get('zones').results.select{ |z| z[:name] == zone_name }.first[:id]
View gist:331c833bc3f562319cdd8f74cac235ce
<input type="hidden" id="bad_words_list" class="input-text" value="absofuckinlutely,ahole,badass,anus,arse,a55,as5,a5s,arsehole,ash0les,asholes,ass,asss,a$$$,a$$,assbag,assbandit,biiiach,biiach,assbanger,assbite,assclown,asscock,asscracker,asses,peckerhead,pussy,fucckk,gay,fuucckk,fucckkk,fucck,nigguh,hairydick,dickhead,niggah,assface,assfuck,assfucker,assgoblin,sh!t,assh0le,assh0lez,fuc,fuk,asshat,ass-hat,nigga,niga,asshead,dick beaters,b1tch,motherfucker,fagit,asshole,assholes,assholz,asshopper,ass-jabber,assjacker,fkkin,fkkn,asslick,asslicker,assmonkey,assmunch,assmuncher,assnigger,nigger,asspirate,ass-pirate,assshit,assshole,asssucker,asswad,asswipe,azzhole,bampot,bassterds,bastard,bastards,bastardz,basterds,basterdz,beaner,biatch,biotch,bitch,bitchass,bitches,bitchs,bitchtits,bitchy,blowjob,blowjob,blowjobs,boffing,recktum,rectum,renob,retard,rimjob,ruski,cunt, cunts,cock,sadist,sandnigger,sandnigger,scank,schlong,screwing,scrote,scrotum,seamen,semen,sex,sexual,sexualtoy,sexuallypopularwoman,sh1ter,sh1ts
@kirkelifson
kirkelifson / distraction.html
Created May 3, 2017
Knightsec Distraction Channel
View distraction.html
<meta charset="UTF-8"><title>Knightsec™ Distraction Channel</title>
<style>
a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}
#watermark
{
position:fixed;
bottom:8%;
right:8%;
opacity:0.5;
You can’t perform that action at this time.