Skip to content

Instantly share code, notes, and snippets.

View lavir's full-sized avatar

Alex Lukyanov lavir

  • ContractMill
  • Finland
View GitHub Profile
@lavir
lavir / README.md
Last active August 29, 2015 14:20 — forked from ngryman/README.md

intellij javascript live templates

Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.

How to

  • Go to settings.
  • Search for live templates.
  • Under the javascript section you should be able to manage your templates.
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
$ cd ~/Downloads/redis-2.4.14
$ make test
$ make
#!/usr/bin/env ruby
require 'wiringpi'
# Sound files
open_sound = 'creaking-door.mp3'
close_sound = ''
# Initialise
io = WiringPi::GPIO.new
pin = 1 # GPIO 18