Skip to content

Instantly share code, notes, and snippets.

View rained23's full-sized avatar
🏠
Working from home

rained23 rained23

🏠
Working from home
View GitHub Profile
app.prepare().then(() => {
const server = express();
if (env.NODE_ENV === "production") {
server.get(
/^\/_next\/static\/(images|fonts)\//,
(_, res, nextHandler) => {
res.setHeader(
"Cache-Control",
"public, max-age=31536000, immutable",
@rained23
rained23 / gist:5e526b2437ac24a8fbc4
Last active August 29, 2015 14:21
Malaysia States Region Array Database
$regions = [
['code'=>'JHR', 'name' => 'Johor'],
['code' => 'KDH', 'name' => 'Kedah'] ,
['code' => 'KTN', 'name' => 'Kelantan'],
['code' => 'MLK', 'name' => 'Melaka'],
['code' => 'NSN', 'name' => 'Negeri Sembilan' ],
['code' => 'PHG', 'name' => 'Pahang'],
['code' => 'PRK', 'name' => 'Perak'],
['code' => 'PLS', 'name' => 'Perlis'],
['code' => 'PNG', 'name' => 'Pulau Pinang'],
@rained23
rained23 / gist:8932657
Created February 11, 2014 10:40
Malaysia States Array
$states = [
'JHR' => 'Johor',
'KDH' => 'Kedah',
'KTN' => 'Kelantan',
'MLK' => 'Melaka',
'NSN' => 'Negeri Sembilan',
'PHG' => 'Pahang',
'PRK' => 'Perak',
'PLS' => 'Perlis',
'PNG' => 'Pulau Pinang',
@rained23
rained23 / README.md
Created December 6, 2013 06:31 — forked from timothyandrew/README.md
Seedbox on DigitalOcean

Introduction

  • This script lets you set up and use a temporary DigitalOcean droplet to download torrent files.
  • Once downloaded, they can be streamed down to your local machine.
  • This uses transmission-cli for the torrent client, and nginx to serve files.

Setup on Local Machine

  • This assumes that you have a DigitalOcean account and tugboat set up, as well as seedbox-setup.sh present in the current directory.