Skip to content

Instantly share code, notes, and snippets.

@shyamjos
shyamjos / kodi
Last active November 7, 2019 15:24
kodi upstart script , Start kodi automatically with raspbian boot. Tutorial https://linuxsuperuser.com/install-latest-version-kodi-raspbian-jessie/
#! /bin/sh
### BEGIN INIT INFO
# Provides: kodi
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: XBMC media centre
# Description: Starts the XBMC media centre in standalone mode
### END INIT INFO
@MifRea1
MifRea1 / single.html
Created March 29, 2016 09:33
epub.js + hammer.js
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Basic ePubJS Example</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<meta name="apple-mobile-web-app-capable" content="yes">
@pburtchaell
pburtchaell / styles.css
Last active February 25, 2024 12:24
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@industrialinternet
industrialinternet / 1_Node-Red EnOcean functions
Last active August 29, 2015 14:02
Node-Red EnOcean Radio telegram functions
These are very basic Node-Red funtions I will in time convert to NR nodes.
They require the ENO300 USB module and use nr-serail-in
57600 8 None 1
Split input: after fixed timeout 50ms
and deliver: binary buffers
I've done all my testing on Raspberry PI.
Please note the send switch funtion need you to set a Base ID to support 128 ID else it will only use the chip ID which means only 1 channel. That said any EnOcean-ers out thier that can help get chip ID working would love your help :)
@g-liu
g-liu / settings.json
Last active October 2, 2016 05:00
Firefox RDM Extended presets
[{"name": "CGA: 320x200", "width": 320, "height": 200},
{"name": "QVGA: 320x240", "width": 320, "height": 240},
{"name": "CIF: 352x288", "width": 352, "height": 288},
{"name": "SIF: 384x288", "width": 384, "height": 288},
{"name": "HVGA: 480x320", "width": 480, "height": 320},
{"name": "VGA (NTSC): 640x480", "width": 640, "height": 480},
{"name": "PAL: 768x576", "width": 768, "height": 576},
{"name": "WVGA: 800x480", "width": 800, "height": 480},
{"name": "SVGA: 800x600", "width": 800, "height": 600},
{"name": "WVGA (NTSC): 854x480", "width": 854, "height": 480},
@branneman
branneman / better-nodejs-require-paths.md
Last active June 29, 2024 16:00
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@polidog
polidog / alloy.jmk(CoffeeScript+jade+stylus)
Last active December 14, 2015 21:39
alloyでCoffessScriptとjadeとstylusを使う為のjmkファイルですよ^^ [追記] event.alloyConfig.deploytypeがdevelopmentの時は基本的にコンパイルしたjs,tss,xmlを消さないように修正
task("pre:compile", function(event,logger) {
var wrench = require("wrench"),
fs = require("fs"),
jade = require("jade"),
path = require("path"),
coffee = require("coffee-script"),
stylus = require("stylus");
event.alloyConfig.coffee = [];
event.alloyConfig.jade = [];
@evandrix
evandrix / README.md
Created September 11, 2012 00:06
Headless web browsers

Here are a list of headless browsers that I know about:

  • [HtmlUnit][1] - Java. Custom browser engine. JavaScript support/DOM emulated. Open source.
  • [Ghost][2] - Python only. WebKit-based. Full JavaScript support. Open source.
  • [Twill][3] - Python/command line. Custom browser engine. No JavaScript. Open source.
  • [PhantomJS][4] - Command line/all platforms. WebKit-based. Full JavaScript support. Open source.
  • [Awesomium][5] - C++/.Net/all platforms. Chromium-based. Full JavaScript support. Commercial/free.
  • [SimpleBrowser][6] - .Net 4/C#. Custom browser engine. No JavaScript support. Open source.
  • [ZombieJS][7] - Node.js. Custom browser engine. JavaScript support/emulated DOM. Open source.
  • [EnvJS][8] - JavaScript via Java/Rhino. Custom browser engine. JavaScript support/emulated DOM. Open source.
@iskugor
iskugor / app.js
Created December 16, 2011 11:40
Titanium insert after functionality
var win = Ti.UI.createWindow({
backgroundColor: '#39f',
layout: 'vertical'
});
var wrapper = Ti.UI.createView({
layout: 'vertical'
});
var label1 = Ti.UI.createLabel({