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
import zlib | |
# Read the android backup file 'backup.ab' and | |
# convert it to a tar archive file 'backup.tar' | |
with open("backup.ab", "rb") as input: | |
_skip = input.read(24) | |
_bytes = input.read() | |
data = zlib.decompress(_bytes) | |
open("backup.tar", "wb").write(data) |
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
# Unpacks a file.unitypackage to a given folder: | |
# example: 'sh ./unpack.sh demo.unitypackage outputfolder' | |
# commands adjusted to work on OSX | |
mkdir $2 | |
tar zxfv $1 --directory $2 | |
find $2 -name asset -exec bash -c '\ | |
filename="`dirname "$(dirname "{}")"`/`cat "$(dirname "{}")/pathname" \ | |
| cut -d$'"'\n'"' -f1 \ |
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
FROM rust:1.60 as build | |
# create a new empty shell project | |
RUN USER=root cargo new --bin holodeck | |
WORKDIR /holodeck | |
# copy over your manifests | |
COPY ./Cargo.lock ./Cargo.lock | |
COPY ./Cargo.toml ./Cargo.toml |
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
#!/bin/bash | |
# Take a window of 600x600 pixels of each image and slice it into tiles of 200x200 pixels. | |
# Save the tiles into a folder ./tiles | |
mkdir ./tiles | |
for f in *.jpg; do | |
filename=$(basename -- "$f") | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
echo "Processing $f file.."; |
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
using System.Collections.Generic; | |
using UnityEditor; | |
using System; | |
using UnityEngine; | |
public class SpriteReplacerSettingsAsset | |
{ | |
[MenuItem("Assets/Create/SpriteReplacerSettings")] |
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
// From https://reactjs.org/docs/hooks-faq.html#what-can-i-do-if-my-effect-dependencies-change-too-often | |
function Counter() { | |
const [count, setCount] = useState(0); | |
useEffect(() => { | |
const id = setInterval(() => { | |
setCount(count + 1); // This effect depends on the `count` state | |
}, 1000); |
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
name | 1990 | 1991 | 1992 | 1993 | 1994 | 1995 | 1996 | 1997 | 1998 | 1999 | 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Algeria | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | |
American Samoa | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1.1 | 1.1 | 1.1 | 1.5 | |
Antigua and Barbuda | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 5 | 0 | 0 | 0 | 0 | |
Azerbaijan | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 3 | 5 | |
Argentina | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08 | 0.09 | 2 | 8 | 15 | 16 | 15 | |
Australia | 0 | 0 | 0 | 11 | 13 | 16 | 19 | 23 | 28 | 34 | 38 | 44 | 50 | 59 | 69 | 79 | 91 | 109 | 127 | 160 | 426 | 1530 | 2559 | 3826 | 4858 | 5968 | |
Austria | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 3 | 5 | 9 | 15 | 18 | 21 | 22 | 24 | 30 | 49 | 89 | 174 | 337 | 582 | 785 | 937 | |
Bangladesh | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 145 | 154 | |
Armenia | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |