Skip to content

Instantly share code, notes, and snippets.

View sudodoki's full-sized avatar

Джон, просто Джон sudodoki

View GitHub Profile
@sudodoki
sudodoki / README.md
Last active August 29, 2015 13:56
Small API for training purposes.

To run API, be sure to run npm install restify mongojs & you can enjoy it, after firing up mongo on local machine & executing node index.js

@sudodoki
sudodoki / index.js
Created May 5, 2014 10:48
requirebin sketch
// example using the raf module from npm. try changing some values!
var requestAnimationFrame = require("raf")
var canvas = document.createElement("canvas")
canvas.width = 500
canvas.height = 500
console.log('express = ', express)
document.body.appendChild(canvas)
@sudodoki
sudodoki / Readme.md
Created May 10, 2014 21:40
Batch geolocate using Yandex geolocator
13842 silly lockFile 514b1d97-aws-sign-0-3-0 aws-sign@~0.3.0
13843 silly lockFile 514b1d97-aws-sign-0-3-0 aws-sign@~0.3.0
13844 verbose tar unpack /Users/username/tmp/npm-1200-ll1366Mb/1402049890606-0.15439230599440634/tmp.tgz
13845 silly lockFile 24a4947c-aum-npm-cookie-jar-0-3-0-package tar:///Users/username/.npm/cookie-jar/0.3.0/package
13846 verbose lock tar:///Users/username/.npm/cookie-jar/0.3.0/package /Users/username/.npm/24a4947c-aum-npm-cookie-jar-0-3-0-package.lock
13847 silly lockFile 41178459-0606-0-15439230599440634-tmp-tgz tar:///Users/username/tmp/npm-1200-ll1366Mb/1402049890606-0.15439230599440634/tmp.tgz
13848 verbose lock tar:///Users/username/tmp/npm-1200-ll1366Mb/1402049890606-0.15439230599440634/tmp.tgz /Users/username/.npm/41178459-0606-0-15439230599440634-tmp-tgz.lock
13849 silly gunzTarPerm modes [ '755', '644' ]
13850 silly gunzTarPerm extractEntry package.json
13851 silly gunzTarPerm extractEntry README.md
angular.element(document.body).injector().invoke(function($http) { $http.get('/api/').then(console.log.bind(console),console.error.bind(console))})
mytask: {
options: {},
a: {
options: {
src: "src",
dest: "dest",
match: '*'
}
},
b: {
(ns rpg.core)
(enable-console-print!)
(def max-lvl 10)
;; lvl(integer) -> att(integer)
;; given lvl calculate attack by formula
;; att = lvl * 2
(defn calc-attack
var fs = require('fs');
var cheerio = require('cheerio');
var Chance = require('chance');
var chance = new Chance();
function getRandomData(type, hint) {
if (type == 'number') {
return (Math.random() * 1000000 | 0) / 100;
} else if (type == 'boolean') {
return Math.random() >= 0.5;
@sudodoki
sudodoki / command.sh
Created July 7, 2014 22:02
Command to generate workshopper skeleton using workshopper's util. Doesn't account for windows style slashes (you can try reversing those) & assuming you're in the root of your workshop directory
node_modules/workshopper/util/makews.js exercises/menu.json