Skip to content

Instantly share code, notes, and snippets.

View mspreij's full-sized avatar
🧗
OK

Maarten Spreij mspreij

🧗
OK
View GitHub Profile
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
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);
alias gl='git log --graph --pretty=format:'\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit'
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
@mspreij
mspreij / humpty.txt
Created July 15, 2014 13:17
123 test!
Humpty-Dumpty sat on a wall..