Skip to content

Instantly share code, notes, and snippets.

View isogram's full-sized avatar
🙊

Muhammad Shidiq isogram

🙊
View GitHub Profile
@isogram
isogram / aria2c.md
Created February 13, 2016 19:26
aria2c command sample

Multiple torrent file download and sent it to background process

aria2c -j5 --max-upload-limit=2K file_1.torrent file_2.torrent file_3.torrent file_4.torrent file_5.torrent > aria2c.log 2>&1 &

@isogram
isogram / app_service_provider.md
Created April 1, 2016 14:50
AppServiceProvider Laravel 5.1 Not Firing

Fix AppServiceProvider Laravel 5.1 not firing

  1. php artisan clear-compiled
  2. Delete file service.json in bootstrap/cache
  3. Change $defer property to false
  4. Check AppServiceProvider, is it working now?
  5. Change back $defer to true again
@isogram
isogram / wkhtmltopdf_wkhtmltoimage.md
Created April 8, 2016 09:50
How to manually install Wktohtmlpdf and Wkhtmltoimage in Ubuntu Server

How to Install Wkhtmltopdf and Wkhtmltoimage in Ubuntu

wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
tar -xvf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
cd wkhtmltox/bin/
sudo mv wkhtmltopdf  /usr/bin/wkhtmltopdf
sudo mv wkhtmltoimage  /usr/bin/wkhtmltoimage
@isogram
isogram / week_to_date.sql
Created May 13, 2016 10:29
Get Date Range From Week Number
select
STR_TO_DATE(concat(tgl, ' Monday'),'%x%v %W') date_start,
STR_TO_DATE(concat(tgl, ' Sunday'),'%x%v %W') date_end
from
(
select
date_format(updated_at, "%Y%v") as tgl,
count(1) as counter
from table
group by tgl
@isogram
isogram / zsh.md
Created June 10, 2016 23:38 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@isogram
isogram / ubuntu-server.md
Last active May 10, 2023 08:39
Setup ubuntu server from scratch
@isogram
isogram / install_elixir.md
Created January 14, 2017 19:23 — forked from rubencaro/install_elixir.md
Elixir installation guide

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then asdf is your best friend.

@isogram
isogram / README-Template.md
Created February 22, 2018 18:37 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@isogram
isogram / jsonapi_rehydrate.py
Created July 30, 2018 10:20
Format JSON API response specification to simple format JSON Format
# -*- coding: utf-8 -*-
__author__ = """Julien Duponchelle"""
__email__ = 'julien@duponchelle.info'
__version__ = '0.2.0'
def parse(content):
"""
:param content: A JSON API document already
:returns: The JSON API document parsed
@isogram
isogram / postgres_duplicate.md
Created September 3, 2018 08:52
PostgreSQL duplicate database with data

Postgres allows the use of any existing database on the server as a template when creating a new database. I'm not sure whether pgAdmin gives you the option on the create database dialog but you should be able to execute the following in a query window if it doesn't:

CREATE DATABASE newdb WITH TEMPLATE originaldb OWNER dbuser;

Still, you may get:

ERROR:  source database "originaldb" is being accessed by other users