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 | |
/* Plugin Name: Damn Vulnerable WordPress Plugin | |
* Description: Intentionally vulnerable plugin for plugin author education | |
* Version: 0.1 | |
* Plugin URI: http://make.wordpress.org/plugins/2013/04/09/intentionally-vulnerable-plugin/ | |
* Author: Jon Cave | |
* Author URI: http://joncave.co.uk | |
* License: GPLv2+ | |
* | |
* DO NOT RUN THIS PLUGIN ON AN INTERNET ACCESSIBLE SITE |
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
1) Database: | |
table name (Eg. users) | |
field name (Eg. department_id) | |
2)Controllers: | |
Name_of_the_controller + _Controller. (Where the name of the controller normally starts with a capital letter. The filename should be the same with name of the controller.) | |
3) Models: | |
Name_Model (try to spesify in a single word (eg. no underscores). |
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
javascript: var x = 1 * prompt("Start From:", window.pageYOffset);var s = 1 * prompt("Speed:", 0.03);var time = document.createElement("div");time.style.position = "fixed";time.style.top = "90%";time.style.left = "90%";document.body.appendChild(time);if (x != null && s !== null) {window.setInterval(function () {if (x + window.innerHeight <= document.height) {x += s;document.body.scrollTop = x;time.innerHTML = ((document.height - (x + window.innerHeight)) / (s * 100)).toFixed(2) + "s";}}, 10);} |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
uglify: { | |
options: { | |
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + | |
'<%= grunt.template.today("yyyy-mm-dd") %> */' | |
}, | |
my_target: { |
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
up(){ | |
limit=$1 | |
startloc=`pwd` | |
for((i=1 ; i <= limit ; i++)) | |
do | |
cd .. | |
done | |
echo "From: $startloc" | |
echo 'To: ' `pwd` | |
} |
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
import pybrain | |
from pybrain.datasets import * | |
from pybrain.tools.shortcuts import buildNetwork | |
from pybrain.supervised.trainers import BackpropTrainer | |
import pickle | |
if __name__ == "__main__": | |
ds = SupervisedDataSet(2, 1) | |
ds.addSample( (0,0) , (0,)) | |
ds.addSample( (0,1) , (1,)) |
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 | |
//Exec time class | |
/* | |
Example: | |
Time::start('functionToTest'); | |
functionToTest(); | |
Time::p(); | |
Time::t(); | |
*/ | |
class Time{ |
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
function makemychoice() { | |
args = Array.prototype.slice.call(arguments); | |
return ( args[~~(args.length * Math.random())] ) + " was chosen."; | |
} | |
// Example: makemychoice("Go to run", "Go to swim", "Fix bug"); | |
// from the creator of unzip.dev |
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
func all(w http.ResponseWriter, r *http.Request) { | |
someText := "Some custom message for the redirect" | |
hj, ok := w.(http.Hijacker) | |
if !ok { | |
http.Error(w, "Webserver doesn't support hijacking", http.StatusInternalServerError) | |
return | |
} | |
conn, bufrw, err := hj.Hijack() | |
checkErr(w, err) |
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 /p id="(Reminder) Did you start a vm? and is it available in adb? " | |
start cmd /k react-native start | |
rem *** HACK ALERT: Sleep for 10 seconds *** | |
ping -n 10 127.0.0.1 > nul | |
start cmd /k react-native run-android | |
REM Might you want to visit unzip.dev ? |
OlderNewer