Skip to content

Instantly share code, notes, and snippets.

View nmfzone's full-sized avatar
🍿
I'm hungry

Nabil Muhammad Firdaus nmfzone

🍿
I'm hungry
View GitHub Profile
@nmfzone
nmfzone / tmux-cheatsheet.markdown
Created January 28, 2016 14:47 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@nmfzone
nmfzone / gulp-resize-and-minify-images.js
Created February 3, 2016 13:10 — forked from ryantbrown/gulp-resize-and-minify-images.js
Gulp - Resize and Optimize / Minify Images
/**
* Make sure Graphicsmagick is installed on your system
* osx: brew install graphicsmagick
* ubuntu: apt-get install graphicsmagick
*
* Install these gulp plugins
* glup, gulp-image-resize, gulp-imagemin and imagemin-pngquant
*
* Group images according to their output dimensions.
* (ex: place all portfolio images into "images/portfolio"
@nmfzone
nmfzone / install.sh
Created March 9, 2016 10:42 — forked from Reddine/install.sh
Install Theano on Ubuntu 14.04
sudo apt-get install build-essential
sudo apt-get update
# BLAS → LAPACK → ATLAS → numpy → scipy → Theano
# remove numpy and scipy
sudo apt-get remove python-numpy
sudo apt-get remove python-scipy
# Instalation commands
sudo apt-get install gfortran
sudo apt-get install libopenblas-dev
sudo apt-get install liblapack-dev
@nmfzone
nmfzone / gist:2dc02fb73f30c47faf39005bd21d6331
Last active June 7, 2020 02:53 — forked from bigsnarfdude/gist:b2eb1cabfdaf7e62a8fc
Install Scala 2.11.8 and sbt 13.11 in Ubuntu 14.04
# Scala Installation
wget www.scala-lang.org/files/archive/scala-2.11.8.deb
sudo dpkg -i scala-2.11.8.deb
# sbt Installation
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
sudo apt-get update
sudo apt-get install sbt
@nmfzone
nmfzone / compat_l5.php
Created May 31, 2016 15:45 — forked from vluzrmos/compat_l5.php
Lumen L5 compatibility helpers. That file should be added on root path of your project... and added to your composer.json
<?php
if(!function_exists('config_path'))
{
/**
* Return the path to config files
* @param null $path
* @return string
*/
function config_path($path=null)
@nmfzone
nmfzone / SieveOfAtkin-Java.java
Created September 1, 2016 07:25 — forked from hephaestus9/SieveOfAtkin-Java.java
Sieve Of Atkin - Java
/*
* The function of this class is to find all prime numbers in range given by the user.
*
* This homework assignment requires several references:
* http://www.avajava.com/tutorials/lessons/how-do-i-use-threads-join-method.html
* http://stackoverflow.com/questions/1428786/best-way-to-find-a-prime-number
* http://web.mit.edu/16.070/www/lecture/big_o.pdf
* http://en.wikipedia.org/wiki/Sieve_of_Atkin
* http://stackoverflow.com/questions/3790142/java-equivalent-of-pythons-rangeint-int
* http://stackoverflow.com/questions/17279519/removing-items-from-list-in-java
@nmfzone
nmfzone / IdDiffFormatter.php
Created September 6, 2016 18:37 — forked from herusdianto/IdDiffFormatter.php
Laravel Carbon Difference For Humans Bahasa Indonesia
<?php namespace Acme\DiffFormatters;
// app/Acme/DiffFormatters/IdDiffFormatter.php
use Laravelrus\LocalizedCarbon\DiffFormatters\DiffFormatterInterface;
use Lang;
class IdDiffFormatter implements DiffFormatterInterface {
/**
@nmfzone
nmfzone / ExamplePassportTest.php
Created December 4, 2016 15:12 — forked from archy-bold/ExamplePassportTest.php
Testing Passport Authenticated Controllers and Routes in Laravel
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ExamplePassportTest extends \PassportTestCase
{
use DatabaseTransactions;
@nmfzone
nmfzone / react_fiber.md
Created January 28, 2017 17:37 — forked from geoffreydhuyvetters/react_fiber.md
What is React Fiber? And how can I try it out today?
@nmfzone
nmfzone / idea
Created August 11, 2018 17:35 — forked from chrisdarroch/idea
Open a project in IntelliJ IDEA from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`