Skip to content

Instantly share code, notes, and snippets.

View yashodhank's full-sized avatar
🎯
Manifesting

Yashodhan yashodhank

🎯
Manifesting
View GitHub Profile
@oconnore
oconnore / swapsetup.sh
Created June 2, 2014 16:43
Encrypted swap
#!/bin/sh
set -e
SWAPNAME="swapfile"
SWAPFILE="/var/swapfile.crypt"
MEMORY=`cat /proc/meminfo | grep MemTotal | sel -c 2`
# Next power of 2 Megabytes above reported memory
MEGABYTES=$(perl -e "use POSIX; print 2**ceil(log(ceil($MEMORY/(2**10)))/log(2))")
@pironic
pironic / backup.php
Created June 13, 2014 22:00
WHM/WHMCS/CPanel Reseller remote backup script for all customers
<?php
include_once('config.php');
include_once('database.php');
try {
// pull a list of customers that are eligible for offsite backup
$db = new Database(
$cfg['db']['host'],
$cfg['db']['dbase'],
$cfg['db']['user'],
@yireo
yireo / evaldecode.php
Created June 24, 2014 15:23
Decode evil scripts encoded with eval(gzinflate(base64_decode()))
<?php
/*
* Basic script to decrypt files encoded with eval(gzinflate(base64_decode($data)));
*/
$file = 'encrypted.php';
$content = file_get_contents($file);
function evaldecode($content, $step = 0) {
//echo "STEP $step\n";
@Lazza
Lazza / README.md
Last active September 20, 2025 00:34
VPNGate Python script

This script is NOT MAINTAINED

This snippet of code was posted in 2014 and slightly revised in 2016 and 2017. It was more of a quick'n'dirty script than a polished tool. It is made only for Linux and in Python 2, which has since become outdated.

I currently do not use it, and I suggest you avoid it as well. Please do not expect support for using this script.

🔥 If you need an alternative, @glaucocustodio has kindly suggested EasyVPN in this comment.

The rest of the README is left for historical purposed.

@wdullaer
wdullaer / install.sh
Last active October 4, 2025 11:31
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@zmwangx
zmwangx / fb-dl.py
Last active October 15, 2025 13:44
Scrape all photos from a public Facebook page.
#!/usr/bin/env python
############################### README ###############################
# External dependencies:
# * libmagic
# * python-dateutil
# * python-magic
# * requests
#
# The shell command call at the end was tested with GNU date from GNU
#!/bin/sh
# Author: Nikita Kovalev, https://gist.github.com/maizy/c4d31c1f539694f721f6
# Based on: https://gist.github.com/visenger/5496675
# Use java7 dependency (openjdk) instead of java6.
# Tested in Ubuntu 12.04.5 (precise)
SCALA="2.11.2"
SBT="0.13.5"
@kalinchernev
kalinchernev / countries
Created October 6, 2014 09:42
Plain text list of countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
# Script to set a windows computer up for remoting
# The script checks the current WinRM/Remoting configuration and makes the necessary changes
# set $VerbosePreference="Continue" before running the script in order to see the output of the script
#
# Written by Trond Hindenes <[email protected]>
#
# Version 1.0 - July 6th, 2014
Param (