This file contains hidden or 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
export DRYRUN="--dry-run" | |
if [ -n "${CONFIRM}" ] | |
then | |
export DRYRUN="" | |
fi | |
patch -p1 $DRYRUN << EOF | |
diff --git a/app/bootstrap.php b/app/bootstrap.php | |
--- a/app/bootstrap.php |
This file contains hidden or 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
set nu autoindent tabstop=4 expandtab shiftwidth=4 |
This file contains hidden or 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 | |
wget "http://www.busybox.net/downloads/binaries/latest/busybox-i486" -O /tmp/busybox | |
adb push /tmp/busybox /data/data/busybox | |
adb shell "mount -o remount,rw /system && mv /data/data/busybox /system/bin/busybox && chmod 755 /system/bin/busybox && /system/bin/busybox --install /system/bin" |
This file contains hidden or 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 re | |
from anki import Collection | |
from anki.media import MediaManager | |
regex = re.compile(u"\[sound:[^\]]+]") | |
col = Collection("<collection-path>.anki2") | |
mm = MediaManager(col, None) | |
ids = col.findCards("deck:<deck-name>") | |
for id in ids: | |
card = col.getCard(id) |
This file contains hidden or 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
package com.company; | |
import org.bouncycastle.jce.provider.BouncyCastleProvider; | |
import javax.crypto.Cipher; | |
import javax.crypto.SecretKey; | |
import javax.crypto.SecretKeyFactory; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.PBEKeySpec; | |
import javax.crypto.spec.SecretKeySpec; |
This file contains hidden or 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
package com.company; | |
import java.lang.reflect.Array; | |
import java.security.MessageDigest; | |
import java.util.*; | |
public class Main { | |
public static void main(String[] args) { | |
List<Cell> todas = new ArrayList<Cell>(); |
This file contains hidden or 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/sh | |
find -type d -print -exec chmod 755 {} \; && find -type f -print -exec chmod 644 {} \; |
This file contains hidden or 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/sh | |
if [ "$#" -ne 2 ]; then | |
echo "Usage: $0 <dedicated-server-ip> <virtual-machine-ip>" | |
exit 1 | |
fi | |
GATEWAY=`echo $1 | awk -F . '{print $1"."$2"."$3".254"}'` | |
IP="$2" |