Skip to content

Instantly share code, notes, and snippets.

View fregante's full-sized avatar

Federico Brigante fregante

View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active June 1, 2024 10:58
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@gjcourt
gjcourt / iPhone Scale.js
Created October 29, 2010 07:19
get the scale on all iDevices
function scale() {
return document.body.clientWidth / window.innerWidth;
}
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@m039
m039 / to_ogv.sh
Created August 3, 2011 16:00
Convert file from .flv to .ogv via ffmpeg
#!/bin/sh
# Author: m039 <flam44 (at) gmail (dot) com>
# usage: ./to_ogv.sh <path to .flv file> <path to .ogv file>
ffmpeg -i ${1} -f ogg -vcodec libtheora -acodec libvorbis ${2}
@alganet
alganet / h.php
Created August 10, 2011 22:43
HTML generator prototype
<?php
print
h::html(
h::head(
h::title('Hi!')
),
h::body(
h::h1('Hello')->id('oi'),
h::ul(
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@swang
swang / iTunes_cleanup.rb
Created November 28, 2011 18:12
Cleans up music files in iTunes library (for Windows) that no longer exist (file moved or deleted).
require "win32ole"
itunes = WIN32OLE.new('iTunes.Application')
library = itunes.LibraryPlaylist
tracks = library.Tracks
c = 1
while (c < tracks.count )
if (tracks[c].Location == "" && tracks[c].BitRate > 0)
#puts tracks[c].Location + " " + tracks[c].Artist + " : " + tracks[c].Name
tracks[c].delete
else
@mikejolley
mikejolley / gist:1604009
Created January 13, 2012 00:31
WooCommerce - Add a special field to the checkout, order emails and user/order meta
/**
* Add the field to the checkout
**/
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field');
function my_custom_checkout_field( $checkout ) {
echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>';
/**
@chriseppstein
chriseppstein / 0_usage.scss
Created February 29, 2012 19:29
This is code that runs using Sass 3.2 prerelease and something like this will be in compass soon.
@include keyframes(appear-and-roundify) {
0% { opacity: 0; @include border-radius(2px); }
100% { opacity: 1; @include border-radius(10px); }
}

High level style in javascript.

Opinions are like assholes, every one has got one.

This one is mine.

Punctuation: who cares?

Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.