Skip to content

Instantly share code, notes, and snippets.

View zackad's full-sized avatar

zackad

View GitHub Profile
@zackad
zackad / index.html
Created August 24, 2022 03:49
Multi direction traffic count reader
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Traffic Count Reader</title>
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script>
<script type="module">
import {
@zackad
zackad / calendar.html.twig
Last active April 6, 2022 11:37 — forked from dsiebel/calendar.html.twig
A Twig template rendering a calendar/datepicker.
{#
time can be any string acceptable by http://www.php.net/strtotime, the
template will output that time's month.
If you don't want to pass in a date you can set time like this:
{% set time = "now"|date("U") %}
{% set time = "December 2012"|date("U") %}
How ever you want to output items onto the calendar is a different issue,
but I'd assume pushing everything into an array numerically indexed by that day:
@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
@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 / 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 / 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 / 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 / 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 / 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 / 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(){