Skip to content

Instantly share code, notes, and snippets.

View Hecatoncheir's full-sized avatar
:octocat:
Focusing

Vitaliy Vostrikov Hecatoncheir

:octocat:
Focusing
View GitHub Profile
@localpcguy
localpcguy / swipeFunc.js
Created November 17, 2011 16:00
Simple Mobile Swipe function to get the swipe direction
var swipeFunc = {
touches : {
"touchstart": {"x":-1, "y":-1},
"touchmove" : {"x":-1, "y":-1},
"touchend" : false,
"direction" : "undetermined"
},
touchHandler: function(event) {
var touch;
if (typeof event !== 'undefined'){
@ijy
ijy / Compass px to em
Created December 7, 2011 08:18
A Compass function to convert pixel font-sizes to em's
@function em($target, $context: $base-font-size) {
@if $target == 0 { @return 0 }
@return $target / $context + 0em;
}
$base-font-size: 15px;
h1 {
font-size: em(21px, 15px); // Outputs 1.4em
}
@ltackmann
ltackmann / SVGSamples.dart
Created December 29, 2011 04:09
SVG in Dart
#import('dart:html');
class SVGSamples {
void run() {
drawlines();
}
void drawlines() {
final int maxY = 250;
@jjdelc
jjdelc / crayola.json
Created February 20, 2012 06:32
Crayola colors in JSON format
[
{
"hex": "#EFDECD",
"name": "Almond",
"rgb": "(239, 222, 205)"
},
{
"hex": "#CD9575",
"name": "Antique Brass",
"rgb": "(205, 149, 117)"
@mitsuoka
mitsuoka / DumpHttpRequest.dart
Last active October 4, 2015 14:28
Dart HTTP server code sample : Returns available information from the request.
/*
Dart code sample : Simple tool for HTTP server development
Returns contents of the HTTP request to the client
1. Save these files into a folder named DumpHttpRequest.
2. From Dart editor, File > Open Folder and select this DumpHttpRequest folder.
3. Run DumpHttpRequest.dart as server.
4. Access the DumpHttpRequest.html file from your browser such as : file:///C:/ … /DumpHttpRequest/DumpHttpRequest.html
5. Enter some text to the text areas and click “Submit using POST” or “Submit using GET” button.
6. This server will return available data from the request. This data is also available on the Dart editor’s console.
Ref: www.cresc.co.jp/tech/java/Google_Dart/DartLanguageGuide.pdf (in Japanese)
@georgeredinger
georgeredinger / setup.md
Created June 23, 2012 23:14 — forked from leesmith/setup.md
Ruby on Rails development setup on Ubuntu 12.04 (vim, git, rbenv)

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev

@dariocravero
dariocravero / README.md
Created October 20, 2012 05:25
Save files in Meteor

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@bioform
bioform / migrations.js
Created March 19, 2013 16:37
Rails like migrations for CompoundJS. Put this code to "/config/initializers/migrations.js"
var migrate = require('migrate')
, join = require('path').join
, fs = require('fs');
module.exports = function(compound) {
var app = compound.app;
var options = {args: []};
/**
* Migration template.

Installation

FreeBSD

portmaster irc/irssi
portmaster irc/irssi-xmpp

OS X

brew install irssi