Skip to content

Instantly share code, notes, and snippets.

View manwithsteelnerves's full-sized avatar

IP manwithsteelnerves

  • www.voxelbusters.com
View GitHub Profile
@Marc-Ducret
Marc-Ducret / SteamBuild.cs
Created March 9, 2023 15:21
Automate build and deploy to Steam
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using DiceKingdoms.Meta;
using UnityEngine;
using Unity.Build;
using UnityEditor;
#!/bin/bash
# seed-storage
# ============
# Seed an existing firebase cloud storage emulator instance. Run it inside your
# project's firebase folder, ie: ./seed-storage.sh <project-name> <dest-folder>
name=firebase_export # firebase export dir name
project=$1 # project name
root=$2 # export root path
@OleksandrKucherenko
OleksandrKucherenko / build.gradle
Last active April 11, 2022 21:06
repack AAR with different types of compatibility things, like: androidx vs support library, include/exclude/repackage aar during compilation
/** Copyright: 2019-*, Oleksandr Kucherenko (olku@artfulbits.se) */
apply plugin: 'com.android.library'
android {
/* ... default android lib OR app configuration ... */
}
configurations {
repack { transitive = false }
compatibility { transitive = false }
@geecko86
geecko86 / index.js
Created July 2, 2019 14:29
Handmade load balancer for Cloudflare Workers
const europe = ["AMS", "ATH", "BCN", "BEG", "TXL", "BRU", "OTP", "BUD", "KIV", "CPH", "DUB", "DUS", "EDI", "FRA", "GVA", "GOT", "HAM", "HEL", "IST", "KBP", "LIS", "LHR", "LUX", "MAD", "MAN", "MRS", "MXP", "DME", "MUC", "LCA", "OSL", "CDG", "PRG", "KEF", "RIX", "FCO", "LED", "SOF", "ARN", "TLL", "SKG", "VIE", "VNO", "WAW", "ZAG", "ZRH"];
const africa = ["CAI", "CMN", "CPT", "DAR", "JIB", "DUR", "JNB", "LOS", "LAD", "MPM", "MBA", "MRU", "RUN", "KGL"];
const asia = ["BKK", "CEB", "CTU", "MAA", "CMB", "SZX", "FUO", "FOC", "CAN", "HGH", "HAN", "HNY", "SGN", "HKG", "HYD", "ISB", "TNA", "KHI", "KTM", "KUL", "LHE", "NAY", "LYA", "MFM", "MNL", "BOM", "NNG", "DEL", "KIX", "PNH", "TAO", "ICN", "SHA", "SHE", "SJW", "SIN", "SZV", "TPE", "TSN", "NRT", "ULN", "WUH", "WUX", "XIY", "EVN", "CGO", "CSX"];
const latinAmerica = ["ASU", "BOG", "EZE", "CWB", "FOR", "LIM", "MDE", "MEX", "PTY", "POA", "UIO", "GIG", "GRU", "SCL", "CUR"];
const middleEast = ["AMM", "BGW", "GYD", "BEY", "DOH", "DXB", "KWI", "BAH", "MCT", "ZDM", "RUH", "
@victorbruce
victorbruce / Firebase.md
Last active March 12, 2024 12:07
My journey with Firebase so far. Cheatsheet to serve as a quick reference when developing firebase applications

Firebase

Set up firebase and Deploy

  • Head over to firebase. Sign in and create a project.

  • Copy your project settings under Firebase SDK snippet into your local project (ie your project's api key, auth domain, databaseURL, etc)

  • Create a file (firebase.js or config.js Any name that suits you is fine)

@clzola
clzola / install-redis.sh
Last active March 23, 2022 19:20
Bash script for installing Redis on Ubuntu 16.04
#!/bin/bash
# Install the Build and Test Dependencies
apt-get update
apt-get install -y curl build-essential tcl
# Download and Extract the Source Code
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
@medvedev
medvedev / build.gradle
Last active October 23, 2023 16:56
Gradle task that prints total dependencies size and (dependency+(size in kb)) list sorted by size desc
...
/* Tested with Gradle 6.3 */
tasks.register("depsize") {
description = 'Prints dependencies for "default" configuration'
doLast() {
listConfigurationDependencies(configurations.default)
}
}
@joshnuss
joshnuss / app.js
Last active March 4, 2024 00:01
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
@hujunfeng
hujunfeng / udid-faq.md
Last active January 24, 2024 14:15
UDID, identifierForVendor and advertisingIdentifier FAQ

What's the difference between UUID, GUID and UDID?

  • UUID (Universally Unique Identifier): A sequence of 128 bits that can guarantee uniqueness across space and time, defined by [RFC 4122][rfc4122].

  • GUID (Globally Unique Identifier): Microsoft's implementation of the UUID specification; often used interchangeably with UUID.

  • UDID _(Unique Device Identifier)): A sequence of 40 hexadecimal characters that uniquely identify an iOS device (the device's Social Security Number, if you will). This value can be retrieved through iTunes, or found using UIDevice -uniqueIdentifier. Derived from hardware details like MAC address.

Is UDID deprecated?