View js-and-bat.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(""==0) {/* | |
@echo off | |
echo "BAT" | |
node "%~f0" %* | |
goto :eof | |
*/ | |
console.log( "js" ); | |
} | |
View ezines.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://gist.github.com/cure53/df34ea68c26441f3ae98f821ba1feb9c | |
http://goo.gl/ZIOZqG (+) | |
http://rol.im/asux/ | |
https://bitbucket.org/decalage/oletools | |
https://goo.gl/fBEuSF (+) | |
https://intothesymmetry.blogspot.co.uk/2016/05/holy-redirecturi-batman.html | |
https://unlogic.co.uk/2016/04/12/binary-bomb-with-radare2-prelude/ | |
http://www.oreilly.com/webops-perf/free/files/docker-security.pdf | |
http://goo.gl/QM0mZx (+) |
View munchery_spider.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
# -*- coding: utf-8 -*- | |
from time import sleep | |
from random import randint | |
from selenium import webdriver | |
from pyvirtualdisplay import Display | |
class MuncherySpider(): | |
def __init__(self): |
View wordpress-change-domain-migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @oldsite='http://oldsite.com'; | |
SET @newsite='http://newsite.com'; | |
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); | |
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite); | |
/* only uncomment next line if you want all your current posts to post to RSS again as new */ | |
#UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite); |
View Mac OS X: Open in Visual Studio Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |
View docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
############################### | |
# Built from local Dockerfile # | |
############################### | |
web: | |
# Build the Dockerfile in this directory. | |
build: . | |
# Mount this directory as a volume at /app | |
volumes: |
View dbal-nullable.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Doctrine\DBAL\Schema\Schema; | |
// assuming you're using composer... | |
$loader = require __DIR__ . '/vendor/autoload.php'; | |
$schema = new Schema(); | |
$users = $schema->createTable('users'); |
View 1) Install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- Compiling --- | |
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz | |
$ tar xzvf redis-2.8.3.tar.gz | |
$ cd redis-2.8.3 | |
$ make | |
$ make install | |
// --- or using yum --- | |
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
View remove-orphan-images.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
shopt -s nullglob | |
readonly base_dir=/var/lib/docker/registry | |
readonly output_dir=$(mktemp -d -t trace-images-XXXX) | |
readonly jq=/usr/bin/jq | |
readonly repository_dir=$base_dir/repositories |
View nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo cp nginx /etc/init.d/ | |
sudo update-rc.d nginx defaults | |
sudo chmod +x /etc/init.d/nginx | |
/etc/init.d/nginx start |
NewerOlder