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
Goes in my tummy |
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
public static class UIApplicationDelegateExtensions | |
{ | |
/// <summary> | |
/// Record the date this application was installed (or the date that we started recording installation date). | |
/// </summary> | |
public static DateTime StampInstallDate(this UIApplicationDelegate @this, string name) | |
{ | |
try | |
{ | |
var query = new SecRecord(SecKind.GenericPassword) { Service = name, Account = "account" }; |
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
'use strict'; | |
const http = require('http'); | |
function addGracefulShutdown(server) { | |
const oldClose = server.close; | |
const connections = {}; | |
let shouldDestroy = false; | |
let connectionId = 0; | |
function destroy(socket) { |
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 * as http from 'http' | |
import * as _ from 'lodash' | |
//! In the standard implementation of http server, calling close is not guaranteed to close the | |
//! server. Any idle connections being kept alive by clients will stay open until their timeout | |
//! is reached. This is problematic for gracefully shutting down a process with an http server. | |
//! This function will create an http server that tracks the open connections. On close, idle | |
//! connections are closed and any newly idled connection is immediately closed as well. When there | |
//! are no more connections on the server, the 'empty' event is raised. |
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
coooooo |
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
/************************ | |
* validationEngaged.js * | |
************************ | |
* | |
* They're really on to us now! The validateLevel function | |
* has been activated to enforce constraints on what you can | |
* do. In this case, you're not allowed to remove any blocks. | |
* | |
* They're doing all they can to keep you here. But you | |
* can still outsmart them. |
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
# The MIT License (MIT) | |
# Copyright (c) 2014 Dave Clark | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
# Usage: ruby extract.rb <TTF> <size: WxH> <output dir> | |
require 'ttfunk' | |
file = TTFunk::File.open(ARGV[0]) | |
size = ARGV[1] | |
output_dir = ARGV[2] | |
`mkdir #{output_dir}` | |
cmap = file.cmap | |
chars = {} |
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
Hey huys??! |
NewerOlder