Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick Caballero nickcaballero

View GitHub Profile
@nickcaballero
nickcaballero / build.sh
Last active Oct 15, 2017
Script to configure NordVPN using OpenVPN on DD-WRT
View build.sh
#!/usr/bin/env bash
# Script to initialize OpenVPN on DD-WRT firmware
TUN=tun0
ROUTER_USER=root
ROUTER_HOST=192.168.1.1
ROUTER_SSH=$ROUTER_USER@$ROUTER_HOST
CONFIG_URL=https://nordvpn.com/api/files/zip
# Pipe input to a file on the router
View Dexter.java
public class Dexter {
private static String optimizedDirectory = "optimized";
private static String workDirectory = "working";
public static void loadFromAssets(Context context, String fileName) throws Exception {
File optimized = new File(optimizedDirectory);
optimized = context.getDir(optimized.toString(), Context.MODE_PRIVATE);
optimized = new File(optimized, fileName);