Skip to content

Instantly share code, notes, and snippets.

@Reanmachine
Reanmachine / test_timezone.php
Created December 5, 2022 22:05
Test Timezone Discrepancy
<?php
$timezones = [
'America/Nuuk',
'Asia/Qostanay',
'Europe/Kyiv',
'Pacific/Kanton',
];
foreach ($timezones as $tz) {
        ^                                              
      <   >                                            
     |     |     WHOO HOO HERE WE GO !!!!!!!!!         
     |     |                                           
     |     |                                           
   " |  ^  | "                                         
  | || | | || |                                        
  | || ( ) || |                                        
 |_|| "_" ||_| ON THE WAY TO THE SURFACE OF THE SUN

Raw Node Modules

+ package.json
+- node_modules/ -- External Dependencies
+- src/
 +- node_modules/
 |+- module-a/  -- Code lives here
 |+- module-b/  -- Code lives here
 +- index.js -- Entry Point
### Keybase proof
I hereby claim:
* I am reanmachine on github.
* I am reanmachine (https://keybase.io/reanmachine) on keybase.
* I have a public key whose fingerprint is 0C22 1776 4C81 EC02 6145 0840 0CF0 F84F EA93 D5C6
To claim this, I am signing this object:
class SessionController
{
construct() {
this.routes = {
"Session:login": this.login
}
}
login(payload) {
// ...
class SessionController
{
@Route("Session:login")
login(payload) {
// ...
}
}
@Reanmachine
Reanmachine / Debounce.js
Created October 28, 2015 16:46
Micro Debounce
function Debounce(timeout) {
this._timeout = timeout;
this._registry = {};
}
Debounce.prototype.run = function(callback) {
var registry = this._registry;
if (registry[callback]) {
clearTimeout(registry[callback]);
}
@Reanmachine
Reanmachine / js-support.js
Created October 7, 2015 16:35
Support Script for showing how javascript works in jsbin
(function() {
var output = $("<pre>");
$("body").append(output);
window.write = function() {
var message = arguments[0];
var formatted = message;
if (arguments.length > 1) {
@Reanmachine
Reanmachine / Bonsai_Api_Users_Draft1.md
Created October 3, 2015 01:53
Bonsai: Users API - Draft 1

Message Packages:

Client -> Server Message Example:

{
    token: string|null - The session token
    type: string - The message type
    payload: object - The payload of the message
}