This file contains hidden or 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
using System; | |
namespace App { | |
class Program { | |
static void Main(string[] args){ | |
Console.Writeline("Hello World!"); | |
} | |
} | |
} |
This file contains hidden or 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 | |
if [ $# -eq 0 ] | |
then | |
echo "Electron forge: please provide the project name". | |
exit 0 | |
fi | |
mkdir $1 | |
cd $1 | |
npm init | |
npm i --save-dev electron-forge |
This file contains hidden or 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 Promise from 'bluebird' | |
import nano from 'nano' | |
import {log} from './utils' | |
const dbService = 1//nano(process.env.DB_SERVICE_URL) | |
export const getDbService = () => { | |
Promise.promisifyAll(dbService.db) |
This file contains hidden or 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 NativeModule(id) { | |
this.filename = id + '.js'; | |
this.id = id; | |
this.exports = {}; | |
this.loaded = false; | |
} | |
NativeModule._source = process.binding('natives'); | |
NativeModule._cache = {}; |
This file contains hidden or 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
# inspired by https://the-super-tiny-compiler.glitch.me/ | |
''' | |
(print 12) | |
(add 2 2) | |
(subtract 4 2) | |
(add 2 (subtract 4 2)) | |
''' | |
import re | |
import sys |
This file contains hidden or 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
#include "stdafx.h" | |
#include <v8.h> | |
#include <string> | |
#include <iostream> | |
#include <fstream> | |
v8::Handle<v8::ObjectTemplate> global; //global object -> window in our web plannette | |
v8::HandleScope handle_scope; | |
v8::Handle<v8::Context> context; |
This file contains hidden or 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
from PIL import Image | |
def getStr(grayscale): | |
if (grayscale >= 230.0): | |
return ' ' | |
if (grayscale >= 200.0): | |
return '.' | |
if (grayscale >= 180.0): | |
return '*' | |
if (grayscale >= 160.0): |
This file contains hidden or 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
var BTree = function (order) { | |
this.order = order; | |
this.values = []; | |
this.children = []; | |
}; | |
BTree.prototype.insert = function (value) { | |
var destination = this.pickChild(value); | |
if (typeof destination === "number") { | |
this.insert.call(this.children[destination], value); |
This file contains hidden or 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
set number | |
colorscheme deus | |
:set guioptions-=m "remove menu bar | |
if has("gui_running") | |
if has("gui_gtk2") | |
set guifont=Monospace\ 13 | |
elseif has("gui_macvim") | |
set guifont=Menlo\ Regular:h14 |
OlderNewer