Skip to content

Instantly share code, notes, and snippets.

View mintchaos's full-sized avatar

Christian Metts mintchaos

View GitHub Profile
@tadly
tadly / rofi-emoji.sh
Last active June 14, 2024 16:40
Rofi emoji picker
#!/usr/bin/env bash
#
# Use rofi to pick emoji because that's what this
# century is about apparently...
#
# Requirements:
# rofi, xsel, xdotool, curl, xmllint
#
# Usage:
# 1. Download all emoji
@hayes
hayes / how-to-log.js
Last active August 29, 2015 14:09
Most loggers write to streams in a risky way, here is a simple demonstration, and way to avoid the issue.
var fs = require('fs')
var http = require('http')
var count = 0
// using fs.createWriteStream directly will cause massive memory and cpu ussage
// var log = fs.createWriteStream('test.log')
// if you want to make your computer feel bad, replace this with the line above
var log = new Logger('test.log')
@chambaz
chambaz / custom-event.js
Created March 24, 2014 17:07
Polyfill for CustomEvent() constructor functionality in Internet Explorer 9 and 10
(function () {
function CustomEvent ( event, params ) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;
};
CustomEvent.prototype = window.Event.prototype;
# Parse database configuration from $DATABASE_URL
import dj_database_url
DATABASES['default'] = dj_database_url.config()
# Honor the 'X-Forwarded-Proto' header for request.is_secure()
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# Allow all host headers
ALLOWED_HOSTS = ['*']
from tastypie.resources import ModelResource
from whatever.models import Exercise, Set, AssignedExercise
class SetResource(ModelResource):
class Meta:
queryset = Set.objects.all()
def obj_create(self, bundle, **kwargs):
# First, rip out the exercise ids so as not to cause a field-list
@toastdriven
toastdriven / mytwilight.tmTheme
Created July 29, 2011 16:04 — forked from epicserve/sublime_text_2_notes.md
My Sublime Text 2 Setup
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Daniel Lindsley</string>
<key>name</key>
<string>My Twilight</string>
<key>settings</key>
<array>

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@endolith
endolith / Has weird right-to-left characters.txt
Last active June 1, 2024 10:58
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶