Skip to content

Instantly share code, notes, and snippets.

View zackad's full-sized avatar

zackad

View GitHub Profile
# uninstall all npm module inside node_modules
# credit goes to http://stackoverflow.com/a/24396148/6265296
npm uninstall `ls -1 node_modules | tr '/\n' ' '`
@zackad
zackad / Dockerfile
Created February 4, 2017 14:29 — forked from herloct/Dockerfile
Dockerfile for OL-Fetish
FROM alpine:3.5
ENV OPENLAYERS_VERSION=3.20.1
RUN apk update --no-cache \
&& apk add --no-cache \
nodejs \
openjdk8 \
&& mkdir -p /openlayers \
@zackad
zackad / rakitan-sorfil.user.js
Created February 24, 2017 14:21
Rakitan.com table sorter and filter.
// ==UserScript==
// @name Rakitan.com Sorter & Filter
// @namespace zackad's script
// @description Sorting and filter entry on rakitan.com
// @include http://rakitan.com/kategori.php?*
// @version 0.1.0
// @grant none
// ==/UserScript==
$(document).ready(function(){
@zackad
zackad / Hello.py
Last active April 27, 2017 03:08
Example calling php command with python
# Example of using python to call external command
# In this case a php command to run php script
from subprocess import call
# First argument is command, second & third argument is parameters
call(["php", "./index.php", "Hello Dunia"])
@zackad
zackad / archives.html
Created January 7, 2018 16:18
archives liquid template for jekyll
---
layout: page
title: Archives
permalink: /archives/
---
<ul class="archive-list">
{% assign year = "" %}
{% assign month = "" %}
{% for post in site.posts %}
@zackad
zackad / monokai-color.html
Last active April 19, 2018 05:11
Monokai variant ascii colorscheme http://colrd.com/palette/33362/
<span class="primitive palette" style="overflow-y: scroll; height: 654px;">
<span style="background-color: rgb(0, 0, 0); width: 119px;"></span>
<span style="background-color: rgb(28, 28, 28); width: 119px;"></span>
<span style="background-color: rgb(150, 0, 80); width: 119px;"></span>
<span style="background-color: rgb(249, 38, 114); width: 119px;"></span>
<span style="background-color: rgb(0, 136, 119); width: 119px;"></span>
<span style="background-color: rgb(166, 226, 46); width: 119px;"></span>
<span style="background-color: rgb(253, 151, 31); width: 119px;"></span>
<span style="background-color: rgb(230, 219, 116); width: 119px;"></span>
<span style="background-color: rgb(119, 17, 221); width: 119px;"></span>
@zackad
zackad / inputrc
Created December 25, 2018 06:14
Default ubuntu inputrc file at "/etc/inputrc"
# /etc/inputrc - global inputrc for libreadline
# See readline(3readline) and `info rluserman' for more information.
# Be 8 bit clean.
set input-meta on
set output-meta on
# To allow the use of 8bit-characters like the german umlauts, uncomment
# the line below. However this makes the meta key not work as a meta key,
# which is annoying to those which don't need to type in 8-bit characters.
@zackad
zackad / nextjs.conf
Created July 1, 2020 10:39
NGINX server configuration for nextjs static generated site.
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
location ~ /.+ {
try_files $uri $uri.html $uri =404;
}
@zackad
zackad / ffmpeg-concat.sh
Last active August 23, 2022 00:46
Concat video file by directory
#!/usr/bin/env sh
# Usage: ffmpeg-concat your-output-prefix output-directory
#
# Note: make sure that output directory is exists and writeable
#
# TODO: add output directory option
# TODO: add filename prefix
prefix=$1
output_directory=$2
@zackad
zackad / php81.nix
Last active January 9, 2022 12:41
Nix setup for webdev with symfony
with import <nixpkgs> {};
let
myPhp = php81.buildEnv {
extensions = { all, ... }: with all; [
curl
dom
fileinfo
filter
iconv