Skip to content

Instantly share code, notes, and snippets.

View mspreij's full-sized avatar
🧗
OK

Maarten Spreij mspreij

🧗
OK
View GitHub Profile
@mspreij
mspreij / humpty.txt
Created July 15, 2014 13:17
123 test!
Humpty-Dumpty sat on a wall..
What I want is for the first to be turned into the second..
/widget => /widget/index.php
/widget/ => /widget/index.php
/widget?act=list => /widget/index.php?act=list
/widget/?act=list => /widget/index.php?act=list
/widget/list => /widget/index.php?act=list
/widget/v2/?act=list => /widget/v2.php?act=list
/widget/v2/list => /widget/v2.php?act=list
alias gl='git log --graph --pretty=format:'\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit'
var data = {
act: 'list',
category: 'jazz'
};
$.post('/ajax.php', data, function(result) {
if (result.success) {
// do things with result.data
}else{
alert('Error: ' + result.message);
CREATE TABLE `test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`first` varchar(64) NOT NULL,
`last` varchar(64) NOT NULL,
`info` text NOT NULL,
`updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8
senanga@hermes:~/nemo/www$ web1 -v cat /app/api.www/v3/shoplet/script.js
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to web1.senanga.net [141.138.198.37] port 22.
debug1: Connection established.
debug1: identity file /home/senanga/.ssh/id_rsa type 1
debug1: identity file /home/senanga/.ssh/id_rsa-cert type -1
debug1: identity file /home/senanga/.ssh/id_dsa type -1
debug1: identity file /home/senanga/.ssh/id_dsa-cert type -1
@mspreij
mspreij / red_cross.svg
Created August 13, 2015 15:07
SVG red cross
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/php
<?php
ob_start();
require 'inc/func.inc.php';
if ($argv[0] == 'php') array_shift($argv);
$script = array_shift($argv); // CLI input array, first item = scriptname, discard
// usage:
if (count($argv) == 0) {
@mspreij
mspreij / itunes.sh
Created November 23, 2016 11:46 — forked from mateuszgachowski-snippets/itunes.sh
Bash: iTunes CLI
#!/bin/sh
#
####################################
# iTunes Command Line Control v1.0
# written by David Schlosnagle
# created 2001.11.08
# @edited Mateusz Gachowski
####################################
showHelp () {
select message, group_concat(facultyId SEPARATOR ',')
from mail_defaults
where code = 'locationSelectionReminder'
group by message