This file contains 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
<?php | |
require __dir__.'/../vendor/autoload.php'; | |
function uuid() { | |
$raw = openssl_random_pseudo_bytes(16); | |
$raw[6] = chr(ord($raw[6]) & 0x0f | 0x40); | |
$raw[8] = chr(ord($raw[8]) & 0x3f | 0x80); | |
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($raw), 4)); | |
} |
This file contains 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
Start | |
= KeyValue* | |
KeyValue | |
= __ key:Key __ value:(Value / Section) __ { | |
return {key: key, value: value}; | |
} | |
Key "key" | |
= QuotedString |
This file contains 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
#include <sourcemod> | |
#pragma semicolon 1 | |
#pragma newdecls required | |
public Plugin myinfo = { | |
name = "", | |
author = "", | |
description = "", | |
version = "0.0.0", |
This file contains 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
bool g_bIsPostAdminCheck[MAXPLAYERS + 1]; | |
void OnClientPostAdminCheckAndCookiesCached(int client) | |
{ | |
// Do thing. | |
} | |
void OnClientConnected(int client) | |
{ | |
g_bIsPostAdminCheck[client] = false; |
This file contains 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'; | |
process.env.TZ = 'America/New_York'; | |
const https = require('https'); | |
const xml2js = require('xml2js'); | |
const sourceUrl = 'https://forums.alliedmods.net/external.php?type=xml&forumids=108&count=5'; | |
function formatTimestamp(date, time) { |
This file contains 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 redis = require('redis').createClient(); | |
const Firebase = require('firebase'); | |
const nest = new Firebase('wss://developer-api.nest.com'); | |
nest.auth('REDACTED'); | |
const HueApi = require("node-hue-api").HueApi; | |
const hue = new HueApi('REDACTED', 'REDACTED'); |
This file contains 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
diff --git a/vm/scripted-invoker.cpp b/vm/scripted-invoker.cpp | |
index 7ecd2bc..a7ef128 100644 | |
--- a/vm/scripted-invoker.cpp | |
+++ b/vm/scripted-invoker.cpp | |
@@ -292,8 +292,14 @@ ScriptedInvoker::Invoke(cell_t *result) | |
} | |
/* Make the call if we can */ | |
- if (ok) | |
+ if (ok) { |
This file contains 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
<?php | |
class Register { | |
// Single-register bitflags | |
const POWER_INPUT_STATUS = 0x00; | |
const POWER_OPERATING_MODE_AND_CHARGE_STATUS = 0x01; | |
const ADC_ENABLE_ONE = 0x82; | |
const ADC_ENABLE_TWO = 0x83; | |
// Double-register values |
This file contains 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: | |
// | |
// HalifaxAPI.getTransactionHistoryQIF(300).then((qif) => console.log(qif)); | |
// | |
(function() { | |
'use strict'; | |
const StatementBaseUrl = 'https://secure.halifax-online.co.uk/personal/link/lp_statement_ajax'; | |
const StatementType = Object.freeze({ |
This file contains 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 SteamCommunity = require('steamcommunity'); | |
var http = require('http'); | |
var steam = new SteamCommunity(); | |
steam.login({ | |
accountName: '[redacted]', | |
password: '[redacted]', | |
steamguard: '[redacted]', | |
}, function(err) { |
NewerOlder