Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Linq;
using System.Text;
using UnityEngine;
public static class CommandCenterReplacement
{
/// <summary>
/// Returns the test value for this key and user, with different probabilities for each value.
/// For example, to have a 40-60 split between the first and second value, you'd pass probabilities as
using Sirenix.OdinInspector;
using UnityEngine;
#if UNITY_EDITOR
#endif
/// <summary>
/// Placed where an obstacle will be spawned when the game loads.
/// Used to fake nested prefabs in a pre-2018.3 world.
/// </summary>
[ExecuteInEditMode]
using Sirenix.OdinInspector;
using UnityEngine;
#if UNITY_EDITOR
#endif
/// <summary>
/// Placed where an obstacle will be spawned when the game loads.
/// Used to fake nested prefabs in a pre-2018.3 world.
/// </summary>
[ExecuteInEditMode]
#if UNITY_IOS
using UnityEditor.Callbacks;
using UnityEditor;
using UnityEditor.iOS.Xcode;
using System.IO;
public class PostProcessXCodeCalendarFix
{
[PostProcessBuild]
public static void ChangeXcodePlist(BuildTarget buildTarget, string pathToBuiltProject)
var fs = require('fs');
// i'm fairly sure i didn't write this, but i don't remember where i got it
// performs a natural sort, so 10 comes after 2.
function naturalCompare(a, b)
{
var i, codeA, codeB = 1, posA = 0, posB = 0, alphabet = String.alphabet;
function getCode(str, pos, code) {
if (code) {
var fs = require('graceful-fs'),
log = require('single-line-log').stdout,
crypto = require('crypto'),
path = require('path'),
async = require('async');
// compute the sha1 hash of the file
function hashFile(name, cb)
{
var hash = crypto.createHash('sha1'),
var fs = require('graceful-fs'),
crypto = require('crypto'),
path = require('path');
// compute the sha1 hash of the file
function hashFile(name, cb)
{
var hash = crypto.createHash('sha1'),
stream = fs.createReadStream(name);
var fs = require('fs'), child_process = require('child_process');
var files = fs.readdirSync('.');
var largeFiles = files.filter(function(f) {
// check if the extension of f is jpg, png, or jpeg
if(['jpg','png','jpeg'].indexOf(f.split('.').slice(-1)[0].toLowerCase()) == -1)
return false;
// check that the file is greater than 600K
var stat = fs.statSync(f);
<?php
$db = new PDO('mysql:host=localhost;dbname=test;charset=utf8', 'root', '');
session_start();
/*
CREATE TABLE users (
id INT(9) AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(30) UNIQUE KEY,
password TEXT);
*/
$action = @$_GET['action'];
@dialupnoises
dialupnoises / analyze.rb
Created November 4, 2014 01:10
TIPPING CULTURE
require 'json'
comments = JSON.parse(File.open('comments.json', 'r').read)
tips = []
collections = []
custom_tips = []
custom_collections = []
send = /^(.+?), (.+?) wants to send you a Bitcoin tip for ([\d,\.]+) (.+?)\./