Skip to content

Instantly share code, notes, and snippets.

View mtuchi's full-sized avatar
🦣
console.log('o_0')

Emmanuel Evance mtuchi

🦣
console.log('o_0')
View GitHub Profile
@mtuchi
mtuchi / downloader.js
Created October 15, 2018 06:40 — forked from jhidalgo3/downloader.js
Use NodeJS to download files
var path = require('path');
var url = require('url');
var http = require('http');
var fs = require('fs');
var write_file;
//what global variable do we have?
var complete = false;
var content_length = 0;
var downloaded_bytes = 0;
Language Lines of Code
HTML 70
Javascript 170
CSS 5

Reference

bike.css

@mtuchi
mtuchi / service-workers.md
Last active September 22, 2018 17:04
Service workers
Service Workers Web Workers
Good for Offline Concurrency
Life span Independent Same as tab
Tab control One for all tabs Many per tab
@mtuchi
mtuchi / README.md
Created June 29, 2017 02:04 — forked from dtinth/README.md
Batch File Rename Script

Batch File Rename

Use JavaScript for Automation to rename files in batch!

Motivation

@mtuchi
mtuchi / README.md
Created June 28, 2017 11:14 — forked from genomics-geek/README.md
Setting up a Dockerized web application with Django REST APIs, ReactJS with Redux pattern, and Webpack Hot Reloading! Mouthful.

Guide on how to create and set up a Dockerized web app using Django REST APIs and ReactJS

Hopefully this will answer "How do I setup or start a Django project using REST Framework and ReactJS?"

This is a guide to show you step by step how this can be setup. If you just want to get started, use the cookiecuter I set up cookiecutter-django-reactjs. It basically is a fork of pydanny's cookiecutter, just added the front-end stuff :).

I created this because it was SUCH a pain in the ass setting up a project using all the latest technologies. After some research, I figured it out and have it working. The repo that implements this is located here. Feel free to use it as a boilerplate ;)

Main features:

  • Django REST APIs
@mtuchi
mtuchi / font-family-s.css
Created May 31, 2017 22:17 — forked from hadongsoo/font-family-s.css
font-family collection
/* https://css-tricks.com/snippets/css/system-font-stack/ */
/* System Fonts as used by GitHub */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
/* System Fonts as used by Medium and WordPress */
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}
@mtuchi
mtuchi / .editorconfig
Last active March 21, 2017 14:31 — forked from joshuamabina/.editorconfig
EditorConfig is awesome (http://editorconfig.org)
# EditorConfig is awesome: http://EditorConfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_size = tab
tab_width = 4
@mtuchi
mtuchi / backup-mysql.sh
Created November 22, 2016 00:36
Backup MySQL DBs
#!/bin/bash
# Add your backup dir location, password, mysql location and mysqldump location
DATE=$(date +%d-%m-%Y)
BACKUP_DIR="$HOME/backup/mysql"
MYSQL_USER="root"
MYSQL_PASSWORD="***"
MYSQL=$(which mysql)
MYSQLDUMP=$(which mysqldump)
@mtuchi
mtuchi / pagekit-template.php
Created November 21, 2016 13:38
How to include css and js file in pagekit
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?= $view->render('head') ?>
<?php $view->style('custom-uikit', 'theme:css/uikit.min.css') ?>
<?php $view->style('theme', 'theme:css/theme.css') ?>
<?php $view->style('uikit-slideset', 'theme:css/components/slideset.css') ?>
<?php $view->style('uikit-slideshow', 'theme:css/components/slideshow.css') ?>
<?php $view->script('theme-jquery', 'theme:app/assets/jquery/dist/jquery.min.js') ?>
@mtuchi
mtuchi / update-atom.sh
Created November 19, 2016 21:07
The easiest possible way to update Atom Editor on Linux
#!/bin/bash
# Update atom from downloaded deb file
rm -f /tmp/atom.deb
curl -L https://atom.io/download/deb > /tmp/atom.deb
dpkg --install /tmp/atom.deb
echo "***** apm upgrade - to ensure we update all apm packages *****"
apm upgrade --confirm false
atom