Skip to content

Instantly share code, notes, and snippets.

prasanthj / lirc-pi3.txt
Last active January 5, 2023 01:35
Getting lirc to work with Raspberry Pi 3 (Raspbian Stretch)
View lirc-pi3.txt
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]).
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch.
Following are the changes that I made to make it work.
$ sudo apt-get update
$ sudo apt-get install lirc
# Add the following lines to /etc/modules file
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
hG3n / include-html.directive.ts
Last active February 27, 2018 12:56
directive to include an external html file into an existing dom-element
View include-html.directive.ts
import {Directive, ElementRef, Input, OnChanges, OnInit} from '@angular/core';
import 'rxjs/add/operator/map';
import {HttpClient, HttpErrorResponse} from "@angular/common/http";
selector: '[includeHtml]'
export class IncludeHtmlDirective implements OnInit, OnChanges {
ericdke / notification.swift
Created October 10, 2014 21:01
Deliver an OSX notification with Swift
View notification.swift
func showNotification() -> Void {
var notification = NSUserNotification()
notification.title = "Test from Swift"
notification.informativeText = "The body of this Swift notification"
notification.soundName = NSUserNotificationDefaultSoundName
jdewit / vim74_lua
Last active June 8, 2023 07:49
Installing vim 7.4 with lua on Ubuntu 12.04
View vim74_lua
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get build-dep vim-gnome
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo rm -rf /usr/local/share/vim
sudo rm /usr/bin/vim
paulkaplan / gist:5770247
Last active October 12, 2021 01:43
Orbit Controls with momentum and damping for THREE.js
View gist:5770247
* @author qiao /
* @author mrdoob /
* @author alteredq /
* @author WestLangley /
* customized for momentum (zoom and phi/delta) by paulkaplan
THREE.OrbitControls = function ( object, domElement ) {
cjgiridhar /
Created August 6, 2012 14:11
Tornado - POST Request Handler
import tornado.ioloop
import tornado.web
class Hello(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
class User(tornado.web.RequestHandler):
def get(self):