Skip to content

Instantly share code, notes, and snippets.

🍼
Family and buisness related projects. OS is on the low side atm

Tino Ehrich fightbulc

🍼
Family and buisness related projects. OS is on the low side atm
  • Big Pun Injections
  • Berlin, Germany
Block or report user

Report or block fightbulc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fightbulc
fightbulc / gist:1360226
Created Nov 12, 2011
GA Asynchronous Tracking as needed for e.g. Single Page Apps
View gist:1360226
<!DOCTYPE html>
<head>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackPageLoadTime']);
</script>
</head>
@fightbulc
fightbulc / contenteditable-post.php
Created Nov 16, 2011
Make contentEditable saveable (quick&dirty)
View contenteditable-post.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>contentEditable</title>
<style type="text/css">
div.wrapper
{
width:300px;
@fightbulc
fightbulc / gist:1373235
Created Nov 17, 2011
icanhaz updated with mustache 0.4.0-dev
View gist:1373235
/*!
ICanHaz.js version 0.9 -- by @HenrikJoreteg
More info at: http://icanhazjs.com
*/
(function($) {
/*
mustache.js — Logic-less templates in JavaScript
See http://mustache.github.com/ for more info.
*/
View gist:1399974
<div id="browser-notification" class="modal hide fade">
<div class="modal-header">
<h3>Did you know? It's about time!</h3>
</div>
<div class="modal-body">
<p><strong>Beatguide only uses awesome features - to display them properly you need to switch to another browser.</strong> Choose one of the following. All free, easy to install and amazing:</p>
<p class="browser clearfix">
<a href="http://google.com/chrome"><img src="/assets/img/browser_chrome.png">Chrome</a>
<a href="http://www.mozilla.com/firefox"><img src="/assets/img/browser_firefox.png">Firefox</a>
<a href="http://www.apple.com/safari/download"><img src="/assets/img/browser_safari.png">Safari</a>
@fightbulc
fightbulc / gist:1445394
Created Dec 7, 2011
coffeescript namespacing
View gist:1445394
# Code:
#
namespace = (target, name, block) ->
[target, name, block] = [(if typeof exports isnt 'undefined' then exports else window), arguments...] if arguments.length < 3
top = target
target = target[item] or= {} for item in name.split '.'
block target, top
# Usage:
#
@fightbulc
fightbulc / gist:1445400
Created Dec 8, 2011
coffeescript array of implicit objects
View gist:1445400
[
foo: 0
bar: 1
,
baz: 2
]
[
{
foo: 0
View user-bet-stats.sql
SELECT
b.status,
count(b.id)
FROM
bets AS b
WHERE
708150929 IN (b.challenger_fbuser_id, opponent_fbuser_id)
GROUP by b.status
View php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
View my.cnf
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
View .gitconfig
[user]
name = fightbulc
email = ehrich@efides.com
[alias]
co = checkout
acm = commit -am
st = status -sb
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
[color]
You can’t perform that action at this time.