Skip to content

Instantly share code, notes, and snippets.

View kriwil's full-sized avatar

Aldiantoro Nugroho kriwil

View GitHub Profile
@leafgarland
leafgarland / gruvbox-cmd-colours.reg
Created July 22, 2015 22:37
Set Windows cmd window colours, based on gruvbox for vim https://github.com/morhetz/gruvbox
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console]
"ColorTable00"=dword:00282828
"ColorTable01"=dword:00888545
"ColorTable02"=dword:001a9798
"ColorTable03"=dword:006a9d68
"ColorTable04"=dword:001d24cc
"ColorTable05"=dword:008662b1
"ColorTable06"=dword:002199d7
@ohanhi
ohanhi / frp.md
Last active May 6, 2024 05:17
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

@non
non / answer.md
Last active February 28, 2025 11:46
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

"""It's a hack for solr backend to apply django-style random ordering
with '?'. Change haystack/backends/solr_backend.py
"""
# .. Somewhere in the beginning
import random
# .. Somewhere in :638, replace content of for-loop into these:
if order_by.startswith('-'):
order_by_list.append('%s desc' % order_by[1:])
elif order_by.startswith('?'):
@alghanmi
alghanmi / podcastgen.py
Last active July 29, 2024 07:43
Podcast Feed Generator -- Generate an podcast RSS feed for a set of media in a directory.
"""Podcast Feed Generator
Generate an podcast RSS feed for a set of media in a directory.
Use the list-extensions argument to see the list of supported extensions. You can add custom extensions using
Usage:
podcastgen.py gen <directory> --title=<podcast-title> --link=<podcast-link> --desc=<description> [--output=<rss-feed-file>] [--feed-link=<feed-url>] [--id=<podcast-id>] [--logo=<image_file>] [--category=<itunes-category> [--subcategory=<itunes-category>]] [--language=<language>] [--use-extension=<ext>]
podcastgen.py list-categories
podcastgen.py list-extensions
podcastgen.py -h | --help
@geovedi
geovedi / tanggapan.md
Last active November 29, 2023 06:06
TL;DR — I don't condemn stupidity, but I can't condone irrationality.

Perhatian: Kalau kamu atau siapapun merasa keberatan atas isi tulisan ini, silakan abaikan karena tulisan ini tidak ditujukan untuk mereka yang belum dewasa, juga tidak ditujukan untuk mereka yang tidak mampu berpikir terbuka dan tentunya tidak ditujukan untuk mereka yang tidak punya rasa humor yang baik.

Kepada wartawan/wartawati: Silakan mengutip tulisan ini tanpa mengubah arti dan mohon mencantumkan tautan agar pembaca dapat membaca sendiri tulisan saya yang sewaktu-waktu diperbarui. Terima kasih untuk para wartawan/wartawati beberapa media yang telah meminta saya menjadi narasumbernya, namun sangat disayangkan saya tidak melayani tanya jawab untuk masalah yang dibahas dalam tulisan ini sampai waktu yang tidak ditentukan.


Terima kasih untuk kalian yang sudah mengirimkan pesan kepada saya lewat surel, Twitter, Facebook dan SMS. Ini tanggapan saya untuk semua pertanyaan, pernyataan dan ajakan kalian.

![](http://fc03.deviantart.net/fs70/f/2013/146/e/7/spongebob_don_t_care_bitch__by_mushroom_c

@sloria
sloria / bobp-python.md
Last active September 9, 2025 10:52
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
docker ps -a | grep Exit | awk '{print $1}' |xargs docker rm
@magnetikonline
magnetikonline / README.md
Last active September 18, 2025 20:18
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@johnvilsack
johnvilsack / es.sh
Created December 3, 2012 23:18
Install ElasticSearch on Ubuntu 12.10
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share