Skip to content

Instantly share code, notes, and snippets.

View mul14's full-sized avatar
:octocat:
Preparing for big things...

Mulia Nasution mul14

:octocat:
Preparing for big things...
View GitHub Profile
@mul14
mul14 / deploy.rb
Created March 22, 2015 00:52
Deploy Laravel 4 with mina http://mina-deploy.github.io/mina/
require 'mina/git'
# Fix the SSH password prompt problem
set :term_mode, nil
# Basic settings:
# domain - The hostname to SSH to.
# deploy_to - Path to deploy into.
# repository - Git repo to clone from. (needed by mina/git)
# branch - Branch name to deploy. (needed by mina/git)
@mul14
mul14 / lang.blade.php
Last active October 21, 2015 04:55
Laravel and JavaScript Localization - Example
var lang = {
required => "{{ trans('required') }}",
email => "{{ trans('email') }}",
};
@mul14
mul14 / README.md
Created December 11, 2015 06:11 — forked from denji/README.md
Remove WebStorm; PhpStorm; PyCharm; RubyMine; AppCode; CLion, IntelliJ; 0xDBE10 settings and cli-links from Mac OSX

Quick uninstall JetBrains settings:

curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
@mul14
mul14 / composer.json
Last active December 29, 2015 02:19
CakePHP composer.json
{
"name": "cakephp-application",
"repositories": [
{
"type": "pear",
"url": "http://pear.cakephp.org"
}
],
"require": {
"pear-cakephp/cakephp": ">=2.4.0"
@mul14
mul14 / VideoStream.php
Created December 31, 2015 07:32 — forked from ranacseruet/VideoStream.php
PHP VideoStream class for HTML5 video streaming
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
@mul14
mul14 / upgrade-everything.sh
Created February 21, 2016 13:19
Upgrade Everything
#!/usr/bin/env sh
sh $HOME/.oh-my-zsh/tools/upgrade.sh
pip3 install --upgrade pip
pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U
pip2 install --upgrade pip
pip2 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip2 install -U
@mul14
mul14 / laravel-new.sh
Last active March 19, 2016 09:40
Simple script to create Laravel project and cd into target directory. Put this script in your bashrc or zshrc file.
laravel-new() {
if [ -z "$1" ]; then
cat << EOF
Please provide a directory name.
Usage:
laravel-new [directory-name]
EOF
return;
@mul14
mul14 / meta-tags.md
Created March 21, 2016 10:40 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@mul14
mul14 / origin_monitor.py
Created May 19, 2016 04:51 — forked from SliceOLife/origin_monitor.py
Checks Origin's on the House page for free games.
import requests
import bs4
from termcolor import colored
root_url = 'https://www.origin.com/en-gb/store/free-games/on-the-house'
def getFreeGames():
try:
response = requests.get(root_url)
soup = bs4.BeautifulSoup(response.text)
@mul14
mul14 / Default (OSX).sublime-keymap
Created June 10, 2016 01:35
My Sublime Text 3 Configurations
[
{ "keys": ["super+shift+v"], "command": "paste" },
{ "keys": ["super+v"], "command": "paste_and_indent" },
{"keys": ["super+\\"], "command": "toggle_side_bar"},
{"keys": ["shift+super+n"], "command": "advanced_new_file_new"},
{"keys": ["shift+5"], "command": "move_to", "args": {"to": "brackets"} },
{"keys": ["ctrl+\\"], "command": "toggle_side_bar"},
{"keys": ["super+shift+space"], "command": "expand_region"},
{"keys": ["option+up"], "command": "expand_region"},
{"keys": ["option+down"], "command": "expand_region", "args": {"undo": true }, "context": [{"key": "expand_region_soft_undo"}] },