Skip to content

Instantly share code, notes, and snippets.

View godDLL's full-sized avatar

Yuli C. godDLL

View GitHub Profile
@godDLL
godDLL / gist:1521661
Created December 26, 2011 17:09
xss01 here for history
91.10.104.16 - - [26/Dec/2011:17:05:10 +0000] "GET /?XXXXXXXXXXXXXXXXXXXXXXXXXXXXXx%3Cscript%3Ealert(%27xss%27);%3C/script%3E HTTP/1.1" 200 1145 "-" "Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:8.0) Gecko/20100101 Firefox/8.0'\x22>"
213.89.131.186 - - [26/Dec/2011:17:05:10 +0000] "GET /static/js/jquery.min.js HTTP/1.1" 200 91668 "http://logger.conceptis.org/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.12 Safari/535.11"
98.14.94.17 - - [26/Dec/2011:17:05:11 +0000] "-" 400 0 "-" "-"
98.14.94.17 - - [26/Dec/2011:17:05:11 +0000] "-" 400 0 "-" "-"
213.89.131.186 - - [26/Dec/2011:17:05:11 +0000] "GET /favicon.ico HTTP/1.1" 404 211 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.12 Safari/535.11"
@godDLL
godDLL / _shuffle.command
Last active December 20, 2015 00:49
MP3 shuffling script meant for use with portable players that lack the capability, like the Mighty DWARF. Place in a folder with all your MP3s to shuffle, and they will get renamed pretty randomly. Can be launched multiple times, ignores files with *.command extension, ignores subfolder contents (renames subfolders, could be used for "album shuf…
#!/usr/bin/env bash
# mp3 shuffling script for portable players that lack it
# put in a folder with target files, they will be renamed
cd "$(dirname "$0")"
D=$(date "+%s")
for N in *; do
test "${N##*.}" = "command" && continue # don't rename our script
X=$(md5<<< "$D$N").${N##*.}
@godDLL
godDLL / animate.js
Last active December 29, 2015 08:59
Schedule a function to run as often as possible, featuring a difference_in_time from the last time it ran, an adjustable clock_with_velocity for bullet time, and a frame counter with which you can build your own FPS meter.
(function (win, undefined){
// Schedule a function to run as often as possible,
// featuring a difference_in_time from the last time it ran,
// an adjustable clock_with_velocity for bullet time,
// and a frame counter with which you can build your own FPS meter.
var gettime = function (){
return (new Date).getTime()
},
animate = (function(){ // animate(fn, starting_velocity)
@godDLL
godDLL / .bash_logout
Last active January 2, 2016 06:19
Every shell is a login shell on Mac OS X. And I symlink `.bash_login` to `.bashrc`, so that `.profile` is getting sourced for interactive Bash shells.
eval printf '%.s-' {1..$COLUMNS}
clear
@godDLL
godDLL / timer-example.log
Last active January 2, 2016 18:19
Works for me on Mac OS X.
$ timer Boring Customer \#4
Name your timer? wordpress
14:12 Started timer wordpress
0s > wait
14:12 Paused timer wordpress
9s + ; 5-minute configuration
9s +
14:22 Started timer wordpress
22m15s > x
14:45 Total time wordpress 22m15s
@godDLL
godDLL / amd-js.html
Last active August 29, 2015 13:56
HTML5 kickstart with AMD Javascript and Responsive CSS
<!doctype HTML>
<meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
<title></title>
<!--[if IE]><script>(function(){var e="abbr,article,aside,audio,canvas,datalist,details,dialog,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(','),i=e.length;while(i--){document.createElement(e[i])}})()</script><![endif]-->
<script>
function init(){
@godDLL
godDLL / import.php
Last active August 29, 2015 14:02
AMD-style modules (as found in Javascript) for PHP >= 5.4
<?php /*! php-import v0.2.5 (c)2014 Yuli Che. <god.dll@icloud.com> @license MIT */
/*
* Javascript's AMD-style modules for PHP >= 5.4
*
*
* USAGE: you write code modules that are scope-isolated and export objects.
*
* <?php /*! PROJECT_URL v0.0.0 (c)2014 YOUR_NAME <YOUR_EMAIL> @license MIT *\/
* defined('PHP_IMPORT') or die(1);
* return new Object(array(
@godDLL
godDLL / gist:6dfeb1e3e4aa6dcbe69f
Created August 24, 2014 14:51
Fixes reordering of nestedSortable Pages in Wolf CMS admin panel.
htdocs/wolf/app/views/page/children.php | 4 ++--
htdocs/wolf/app/views/page/index.php | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/htdocs/wolf/app/views/page/children.php b/htdocs/wolf/app/views/page/children.php
index 35de777..eda18d5 100644
--- a/htdocs/wolf/app/views/page/children.php
+++ b/htdocs/wolf/app/views/page/children.php
@@ -19,7 +19,7 @@
<ul<?php if ($level == 1) echo ' id="site-map" class="sortable tree-root"'; else echo ' class="sortable child"'; ?>>

Install web development tools to Mavericks (OS X 10.9)

Strongly opinionated set of guides to quickly setup OS X Mavericks for web development. By default OS X hides stuff that normal people don't need to see. These settings are better defaults for developers.

I don't want: any sounds, annoying confirmation dialogs, hidden extensions, superflous animations, unnecessary things running like Dashboard, Notification center or Dock(Alfred/spotlight works better for me).

These are my opinions. Read this document through and pick up the good parts to your preferences.

System preferences

@godDLL
godDLL / amd-es3.md
Last active October 11, 2015 10:41
Concise, pick-and-choose code libraries.

AMD, CJS and global Window namespaced modules for JavaScript.
Universal Module Definition IE6

Reactive programming with Observables.
Kefir

Request routing after the initial page-load.
PathJS IE7, Firefox 3.6, Chrome 9