Skip to content

Instantly share code, notes, and snippets.

View duyet's full-sized avatar

duyet duyet

View GitHub Profile
@duyet
duyet / web-servers.md
Last active September 7, 2015 16:16 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@duyet
duyet / mysqlbackup.sh
Created October 18, 2015 11:44 — forked from nicdoye/mysqlbackup.sh
Backup your OpenShift MySQL database. My DB is only small so I didn't bother to compress it through a pipe. sftp it back from your local machine afterwards This is basically a quick hack from running "type mysql" on the OpenShift gear - hint: it's a bash function/alias
mkdir ~/app-root/data/tmp
mysqldump -h $OPENSHIFT_MYSQL_DB_HOST -P ${OPENSHIFT_MYSQL_DB_PORT:-3306} -u ${OPENSHIFT_MYSQL_DB_USERNAME:-'admin'} --password="$OPENSHIFT_MYSQL_DB_PASSWORD" --all-databases > ~/app-root/data/tmp//all.sql
@duyet
duyet / README.md
Created December 26, 2015 11:32 — forked from kentcdodds/README.md
upload-file

upload-file angular-formly type

This is my upload-file type for what I use at work. We use angular-upload for the upload service to do the actual file uploading. We also have several abstractions and use ES6 that may confuse you a little bit (sorry about that). Hopefully this gets you started though.

@duyet
duyet / springer-free-maths-books.md
Created December 29, 2015 20:41 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@duyet
duyet / gulp-bookmarks.md
Created January 3, 2016 13:20 — forked from dypsilon/gulp-bookmarks.md
Collection fo Gulp Bookmarks
@duyet
duyet / dropbox
Last active March 12, 2016 17:39 — forked from lmammino/dropbox
Run dropbox CLI as service
#/etc/init.d/dropbox
start() {
echo "Starting dropbox..."
start-stop-daemon -b -o -c dropbox -S -x /dropbox/.dropbox-dist/dropboxd
}
stop() {
echo "Stopping dropbox..."
start-stop-daemon -o -c dropbox -K -x /dropbox/.dropbox-dist/dropboxd
@duyet
duyet / blog-webpack-2.md
Created May 16, 2016 02:06 — forked from xjamundx/blog-webpack-2.md
From Require.js to Webpack - Part 2 (the how)

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

@duyet
duyet / test_dags.py
Created October 17, 2019 07:47 — forked from criccomini/test_dags.py
test_dags.py
import os
import unittest
from airflow.models import DagBag
class TestDags(unittest.TestCase):
"""
Generic tests that all DAGs in the repository should be able to pass.
"""