For anyone considering the use of ULIDs in MySQL with drizzle, here's a ready-to-use ULID type for your convenience.
import { Ulid as ULID } from "id128";
export const ulid = customType<{
data: string;
notNull: true;
default: false;For anyone considering the use of ULIDs in MySQL with drizzle, here's a ready-to-use ULID type for your convenience.
import { Ulid as ULID } from "id128";
export const ulid = customType<{
data: string;
notNull: true;
default: false;| <?php | |
| /** | |
| * Get font awesome file icon class for specific MIME Type | |
| * @see https://gist.github.com/guedressel/0daa170c0fde65ce5551 | |
| * | |
| */ | |
| function ($mime_type) { | |
| // List of official MIME Types: http://www.iana.org/assignments/media-types/media-types.xhtml | |
| $icon_classes = array( |
| /** | |
| * Converts an RGB color value to HSL. Conversion formula | |
| * adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
| * Assumes r, g, and b are contained in the set [0, 255] and | |
| * returns h, s, and l in the set [0, 1]. | |
| * | |
| * @param Number r The red color value | |
| * @param Number g The green color value | |
| * @param Number b The blue color value | |
| * @return Array The HSL representation |
| Object.defineProperty(Object.prototype, "hide", { | |
| value: function () { | |
| [].forEach.call(arguments, function (name) { | |
| var descriptor = Object.getOwnPropertyDescriptor(this, name); | |
| if (descriptor.enumerable) { | |
| descriptor.enumerable = false; | |
| Object.defineProperty(this, name, descriptor); | |
| } | |
| }, this); | |
| } |
Node.js is just JavaScript running on the server side. That's it. That's all there is to it.
go to https://github.com/maxogden/art-of-node#art-of-node to view the newer versions of this document
| #!/bin/bash | |
| # REQUIRES SUDO | |
| # Benchmark runner | |
| repeats=20 | |
| output_file='benchmark_results.csv' | |
| command_to_run='echo 1' | |
| run_tests() { | |
| # -------------------------------------------------------------------------- |
| // This is currently just a proof of concept. My OAuth usage requires setting | |
| // a cookie client-side (server does not do this) after successful authentication. | |
| // AIR runtime does not allow XHR to set cookie header so I had to use AIR's | |
| // URLRequest object. | |
| // | |
| // I imagine you can do the same thing but use jsOAuth.request or something in | |
| // place of URLRequest | |
| // | |
| // http://api.jquery.com/extending-ajax/#Transports |
| iPad | |
| 1024 × 690 In landscape on iOS 4.3 | |
| 1024 × 672 In landscape on iOS 5 | |
| 768 × 946 In portrait on iOS 4.3 | |
| 768 × 928 In portrait on iOS 5 | |
| 1024 × 660 Always showing bookmarks bar in landscape on iOS 4.3 | |
| 1024 × 644 Always showing bookmarks bar in landscape on iOS 5 | |
| 768 × 916 Always showing bookmarks bar in portrait on iOS 4.3 |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |