Skip to content

Instantly share code, notes, and snippets.

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

Sebastiaan Provost LeShadow

💭
¯\_(ツ)_/¯
View GitHub Profile
@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|
+ # 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 / freshOnions.md
Created September 28, 2015 10:40
tor-control protocol for rapidly switching circuits / new exit node to your tor instance
@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 / 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 / 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