chmod +x convert.pe
./conver.pe Your-Font.ttf
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
Number.prototype.pad = function(size) { | |
var s = String(this); | |
while (s.length < (size || 2)) {s = "0" + s;} | |
return s; | |
} | |
(1).pad(3) // => "001" | |
(10).pad(3) // => "010" | |
(100).pad(3) // => "100" |
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
html = Faraday.get("http://ogp.me").body | |
if (data = html.scan(/property=["|']og:(.*)["|'].*content=["|'](.*)["|']/)) | |
og = OpenStruct.new(Hash[ data ]) | |
puts og.inspect | |
end |
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
node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../gulpfile.js --cwd ../../ build |
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
// three.js JSON Atlas Loader | |
// Requires: whatwg-fetch (https://github.com/github/fetch) | |
var materials = {} | |
fetch('images/spritesheet.json').then(function(response) { | |
return response.json() | |
}).then(function(json) { | |
var atlasTexture = THREE.ImageUtils.loadTexture('images/' + json.meta.image, undefined, function() { |
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(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.PIXI = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
(function (process){ | |
/*! | |
* async | |
* https://github.com/caolan/async | |
* | |
* Copyright 2010-2014 Caolan McMahon | |
* Released under the MIT license | |
*/ | |
/*jshint onevar: false, indent: |
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
[ 1:45:24] endel:~/Projects | |
$ curl -sSL https://raw.githubusercontent.com/doubleleft/hook/master/scripts/install.sh | bash | |
Cloning into 'hook'... | |
remote: Counting objects: 248, done. | |
remote: Compressing objects: 100% (219/219), done. | |
remote: Total 248 (delta 9), reused 120 (delta 6), pack-reused 0 | |
Receiving objects: 100% (248/248), 155.39 KiB | 0 bytes/s, done. | |
Resolving deltas: 100% (9/9), done. | |
Checking connectivity... done. | |
# check dependencies |
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
# RPG Maker sprite-sheet extractor | |
require 'fileutils' | |
target_file = File.basename(ARGV[0], File.extname(ARGV[0])) | |
output_dir = "#{File.dirname(ARGV[0])}/#{target_file}" | |
FileUtils.mkdir_p(output_dir) | |
# extract each sprite | |
%x(convert #{ARGV[0]} -crop 24x32 #{output_dir}/sprite-%03d.png) |
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
/* | |
* modified from http://www.voidware.com/moon_phase.htm | |
*/ | |
function getMoonPhase(year, month, day) | |
{ | |
var c = e = jd = b = 0; | |
if (month < 3) { | |
year--; |
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 app = angular.module('admin', ['ng-admin']), | |
hook = new Hook.Client({...}); | |
var headerNav, pageWrapper, restangular; | |
if (hook.auth.currentUser && hook.auth.currentUser.role != 'admin') { | |
hook.auth.logout(); | |
} | |
function hideMenu() { |