Skip to content

Instantly share code, notes, and snippets.

View nyaray's full-sized avatar
💭
Keeping it real, like floats and doubles

Emilio Nyaray nyaray

💭
Keeping it real, like floats and doubles
View GitHub Profile
@rlipscombe
rlipscombe / exwx.exs
Created November 26, 2017 16:08
Using wxWidgets from Elixir
#!/usr/bin/env elixir
defmodule Canvas do
@behaviour :wx_object
@title "Canvas Example"
@size {600, 600}
def start_link() do
:wx_object.start_link(__MODULE__, [], [])
@jonekdahl
jonekdahl / npm-shrinkwrap.json
Created May 18, 2016 20:59
Shrinkwrap för Valtech Shortie
{
"name": "valtech-shortie",
"version": "1.0.0",
"dependencies": {
"browserify": {
"version": "3.46.1",
"from": "browserify@^3.31.2",
"resolved": "https://registry.npmjs.org/browserify/-/browserify-3.46.1.tgz",
"dependencies": {
"JSONStream": {
@bga
bga / [fun] various forms of ternary operator in JavaScript.js
Created March 7, 2012 15:10
[fun] various forms of ternary operator in JavaScript
// add your variants of
a ? b : c
// in comments :)
// a is boolean
// b and c - any type
// lazy evaluation isnt important
@bipthelin
bipthelin / vimrc.after
Created February 28, 2012 20:07
My Vimrc
filetype plugin indent on
color Kellys
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set noautochdir
@jgilfelt
jgilfelt / DoubleTapZoomMapView.java
Created February 8, 2012 14:17
Android - MapView implementing double tap to zoom
public class DoubleTapZoomMapView extends MapView {
private static final long TIME_INITIAL = -1;
private static final long TIME_DOUBLE_TAP = 250;
private long lastTouchTime = TIME_INITIAL;
public DoubleTapZoomMapView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Munter
Munter / Ext.data.Model-deepValidation.js
Created December 16, 2010 14:59
Deep validation of Sencha Touch models
Ext.override(Ext.data.Model, {
/**
* Validates the current data against all of its configured {@link #validations} and returns an
* {@link Ext.data.Errors Errors} object
* @param {Boolean} deep Boolean to indicate whether to validate relations as well
* @return {Ext.data.Errors} The errors object
*/
validate: function(deep) {
var errors = new Ext.data.Errors(),
validations = this.validations,