A Pen by Ramnath Vaidyanathan on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as es6Promise from 'es6-promise' | |
es6Promise.polyfill() | |
import 'isomorphic-fetch' | |
import * as m from 'mithril' | |
export function oninit (vnode) { | |
return new Promise((resolve, reject) => { | |
vnode.attrs.title = 'Title!' | |
vnode.attrs.keywords = 'Mithril Node Render Server Render Example' | |
vnode.attrs.description = 'This is a mithril node render server rendering example.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: node-red | |
# Required-Start: $local_fs $remote_fs $network | |
# Required-Stop: $local_fs $remote_fs $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start or stop the node-red server | |
### END INIT INFO | |
# Can be downloaded and installed in one go by using this command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const random = +new Date() | |
export default { | |
selector: function(sel) { | |
let match = /^\s*@keyframes (.*)$/i.exec(sel) | |
return match ? '@keyframes ' + match[1].trim() + random : sel | |
}, | |
value: function(val, key) { | |
return key=='animateName' ? val + random : val | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare namespace CssObj { | |
interface Options { | |
local?: boolean | LocalOption; | |
cssom?: cssomOption; | |
plugins?: any[]; | |
} | |
interface cssomOption { | |
frame?: any, | |
prefixes?: string[], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
// IndexedDB | |
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.OIndexedDB || window.msIndexedDB, | |
IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.OIDBTransaction || window.msIDBTransaction, | |
dbVersion = 1.0; | |
// Create/open database | |
var request = indexedDB.open("elephantFiles", dbVersion), | |
db, | |
createObjectStore = function (dataBase) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* workflow for: | |
* - transpiling tsx to mithril hyperscript | |
* - replacing simple typed class names to cssobj's helper function res.mapClass, keep in mind to safely set this object | |
*/ | |
var gulp = require('gulp') | |
var browserSync = require('browser-sync').create() | |
var ts = require('gulp-typescript') | |
var replace = require('gulp-replace') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"log" | |
"net/http" | |
"reflect" | |
"time" | |
"github.com/gorilla/context" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"database/sql" | |
"encoding/json" | |
"errors" | |
"fmt" | |
"log" | |
"net/http" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __LINUX_COMPILER_H | |
#define __LINUX_COMPILER_H | |
#ifndef __ASSEMBLY__ | |
#ifdef __CHECKER__ | |
# define __user __attribute__((noderef, address_space(1))) | |
# define __kernel __attribute__((address_space(0))) | |
# define __safe __attribute__((safe)) | |
# define __force __attribute__((force)) |