Skip to content

Instantly share code, notes, and snippets.

View umutakturk's full-sized avatar
🏠
Working from home

Umut Akturk umutakturk

🏠
Working from home
View GitHub Profile
@fwielstra
fwielstra / api.js
Created June 14, 2011 14:46
An example NodeJS / Mongoose / Express application based on their respective tutorials
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
@xeoncross
xeoncross / readme.md
Last active November 1, 2017 07:57
140 byte PHP routing framework (well, it's just a function actually)

140 byte PHP routing system.

This is a very simply routing system that makes it easy to test requests to different paths. This is very limited so do not use for your applications - it's just for fun.

require('route.php');

// A user profile
route('/(\w+)/profile', function($path, $user)
{

print "Hello " . $user;

@oxyberg
oxyberg / hook.php
Last active April 17, 2019 22:28
The smallest PHP Hook class (Observer pattern). https://twitter.com/mvoult/status/340782689286250496
class h{private$e;function b($n,$c){$this->e[$n][]=$c;}function c($n){foreach($this->e[$n] as$c)call_user_func($c);}}
@BlakeTurner
BlakeTurner / to-markdown.php
Created June 20, 2013 20:25
Convert HTML to Markdown in PHP. Great for migrating away from terrifying wysiwyg code.
<?php
/*
* to-markdown - an HTML to Markdown converter for PHP
*
* Copyright 2013, Blake Turner
* Licenced under the MIT licence
*
*/
@xem
xem / codegolf.md
Last active August 1, 2024 14:30
JS code golfing

codegolf JS

Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...

(For more info and other projects, visit http://xem.github.io)

(Official Slack room: http://jsgolf.club / join us on http://register.jsgolf.club)

Git Cheat Sheet

Commands

Getting Started

git init

or