Skip to content

Instantly share code, notes, and snippets.

View tuefekci's full-sized avatar

Giacomo Tüfekci tuefekci

View GitHub Profile
@bobthecow
bobthecow / tab.bash
Last active November 10, 2023 08:47
Open new Terminal tabs from the command line
#!/bin/bash
#
# Open new Terminal tabs from the command line
#
# Author: Justin Hileman (http://justinhileman.com)
#
# Installation:
# Add the following function to your `.bashrc` or `.bash_profile`,
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc`
#
<?php
function before($route)
{
$uri = request_uri();
$is_admin = preg_match('%^/admin(/.+)?$%', $uri);
# Authentication if required
$auth_required = $is_admin && $uri != "/admin/login" && $uri != "/admin/logout";
if($auth_required) authentication_is_required();
@NTICompass
NTICompass / QRLogo.php
Created October 13, 2011 03:10
QR Code + Logo Generator
<?php
/**
* QR Code + Logo Generator
*
* http://labs.nticompassinc.com
*/
$data = isset($_GET['data']) ? $_GET['data'] : 'http://labs.nticompassinc.com';
$size = isset($_GET['size']) ? $_GET['size'] : '200x200';
$logo = isset($_GET['logo']) ? $_GET['logo'] : FALSE;
@marcomontes
marcomontes / gameengines.md
Created October 26, 2011 04:35 — forked from bebraw/gameengines.md
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out these pages: [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]].

Name Latest Release Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 1.3.1 (2011/05) 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
Aves Commer-cial Obsolete. Company bought by Zynga. [E3 2010 Aves Engine Prototype "Suburban World"](http://www.
@pamelafox
pamelafox / twitter-bootstrap.scss
Created March 24, 2012 15:53
Bootstrap Android Overrides
body.android {
.modal {
@include box-shadow(none);
@include background-clip(border-box);
@include border-radius(0px);
border: 1px solid black;
}
.alert {
@include border-radius(0px);
text-shadow: none;
@timnew
timnew / Rename.ps1
Last active March 15, 2024 13:49
Script to Rename Computer without Reboot
$ComputerName = "New Name"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname"
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\Computername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname" -value $ComputerName
Set-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -name "AltDefaultDomainName" -value $ComputerName
@maxparm
maxparm / .htaccess
Created July 13, 2012 15:37
.htaccess with appropriate CORS header
<IfModule mod_rewrite.c>
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"
Header add Access-Control-Allow-Headers: "Content-Type"
RewriteEngine on
RewriteBase /
</IfModule>
@krisavi
krisavi / random.js
Created September 29, 2012 01:43
Our extenderEntity for convinience
me.ExtendEntity = me.ObjectEntity.extend({
init: function(x, y, settings) {
// melonJS / Tiled sprite width and height fallback
if(settings.spritewidth == undefined) settings.spritewidth = settings.width || 32;
if(settings.spriteheight == undefined) settings.spriteheight = settings.height || 32;
this.parent(x, y, settings);
// melonJS position fix.
this.pos.y = y;
@kucrut
kucrut / nav-menu-item-custom-fields.php
Created September 29, 2012 15:39 — forked from westonruter/nav-menu-item-custom-fields.php
Proof of concept for how to add new fields to nav_menu_item posts in the WordPress menu editor.
<?php
/**
* Proof of concept for how to add new fields to nav_menu_item posts in the WordPress menu editor.
* @author Weston Ruter (@westonruter), X-Team
*/
add_action( 'init', array( 'XTeam_Nav_Menu_Item_Custom_Fields', 'setup' ) );
class XTeam_Nav_Menu_Item_Custom_Fields {
static $options = array(
@konsumer
konsumer / index.html
Created October 26, 2012 12:32
Load Flare levels in melonjs
<!DOCTYPE html>
<html>
<head>
<title>Iso Demo</title>
<style>
html, body {
padding:0;
margin:0;
}
#framecounter {