Skip to content

Instantly share code, notes, and snippets.

View LeShadow's full-sized avatar
💭
¯\_(ツ)_/¯

Sebastiaan Provost LeShadow

💭
¯\_(ツ)_/¯
View GitHub Profile
@LeShadow
LeShadow / install_python.sh
Created January 11, 2017 13:54 — forked from andriisoldatenko/install_python.sh
Install local Python 2.7.10 on CentOS 7
TMP_PATH=~/tmp_install_python
# Versions section
PYTHON_MAJOR=2.7
PYTHON_VERSION=$PYTHON_MAJOR.10
mkdir $TMP_PATH && cd $TMP_PATH
# Update yum and libraries
yum -y update
@LeShadow
LeShadow / mou.md
Created June 13, 2016 11:39 — forked from zhenyi2697/mou.md
markdown: mou demo

Mou

Mou icon

Overview

Mou, the missing Markdown editor for web developers.

Syntax

@LeShadow
LeShadow / belongs-to-many.sublime-snippet
Created April 6, 2016 08:02 — forked from adamwathan/belongs-to-many.sublime-snippet
Eloquent Relationship snippets for Sublime Text
<snippet>
<content><![CDATA[
public function ${1:relationship}()
{
return \$this->belongsToMany(${1/^(.+)$/(?1\u$1:)/g}::class, {$2:table});
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>belt</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@LeShadow
LeShadow / freshOnions.md
Created September 28, 2015 10:40
tor-control protocol for rapidly switching circuits / new exit node to your tor instance
+ # Updating the hosts file with all the sites that are defined in Homestead.yaml
+ if Vagrant.has_plugin?("vagrant-hostsupdater") && settings["hosts_file_additions"] == true
+ hosts = []
+ settings["sites"].each do |site|
+ hosts.push(site["map"])
+ end
+ config.hostsupdater.aliases = hosts
+ end
@LeShadow
LeShadow / gist:131863b8844cec8edde3
Last active August 29, 2015 14:07
#drupageddon PoC (untested)
require 'net/http'
require 'uri'
require 'optparse'
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: poc.rb [options]"
opts.on("-d", "--drupal_url=drupal_host", "Define the url for your drupalsite without. (www.domain.tld)") do |drupal_url|
@LeShadow
LeShadow / #drupageddon PoC
Created October 16, 2014 07:29
#drupageddon PoC
require 'net/http'
require 'uri'
require 'optparse'
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: poc.rb [options]"
opts.on("-d", "--drupal_url=drupal_host", "Define the url for your drupalsite without. (www.domain.tld)") do |drupal_url|
/usr/bin/gitify:23:in `load': /Library/Ruby/Gems/2.0.0/gems/projectify-0.5.0/bin/gitify:46: syntax error, unexpected keyword_else, expecting keyword_end (SyntaxError)
/Library/Ruby/Gems/2.0.0/gems/projectify-0.5.0/bin/gitify:53: syntax error, unexpected tIDENTIFIER, expecting keyword_end
command = options[:type] + " " options[:dir]
^
/Library/Ruby/Gems/2.0.0/gems/projectify-0.5.0/bin/gitify:54: syntax error, unexpected keyword_elsif, expecting keyword_end
elsif options.has_key?("dir".to_sym) do
^
/Library/Ruby/Gems/2.0.0/gems/projectify-0.5.0/bin/gitify:56: syntax error, unexpected keyword_else, expecting keyword_end
/Library/Ruby/Gems/2.0.0/gems/projectify-0.5.0/bin/gitify:70: syntax error, unexpected end-of-input, expecting keyword_end
from /usr/bin/gitify:23:in `<main>'
require 'optparse'
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: gitify [options]"
opts.on("-n", "--namespace=NAMESPACE", "Define the namespace of the repository. if this is empty, no namespace will be used.") do |namespace|
options[:namespace] = namespace
end
@LeShadow
LeShadow / 0_reuse_code.js
Created August 5, 2014 14:32
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console