Skip to content

Instantly share code, notes, and snippets.

View piharpi's full-sized avatar

Harpi piharpi

View GitHub Profile
@piharpi
piharpi / group_posts_by_year_jekyll.html
Created November 24, 2019 04:43
Liquid Template language to group jekyll blog posts by year.
{% for post in site.posts %}
{% capture current_year %}
{{post.date | date: "%Y"}}
{% endcapture %}
{% if current_year != previous_year %}
{% assign previous_year = current_year %}
<h4 class="post-header">
<span role="img" aria-label="icon-book" aria-hidden="true">🎉</span>
{{ current_year }}
</h4>

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

@piharpi
piharpi / .block
Created March 16, 2020 05:27 — forked from tvalentius/.block
HDI Indonesia Choropleth Map
border: no
license: MIT
{
"info": {
"_postman_id": "2bd6819b-7315-4be0-99ce-1b8a42f80427",
"name": "Forum API Copy",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "26241780"
},
"item": [
{
"name": "Users",
@piharpi
piharpi / fix-microphone-background-noise.sh
Created March 29, 2025 00:12 — forked from adrianolsk/fix-microphone-background-noise.sh
FIx linux microfone background noise
# Microphone Realtime background noise reduction script
# author Luigi Maselli - https://grigio.org licence: AS-IS
# credits: http://askubuntu.com/questions/18958/realtime-noise-removal-with-pulseaudio
# run as: sudo && pulseaudio -k
# wget -qO - https://gist.github.com/adrianolsk/bfa32f3227dc674eff72a2008f6c0316 | sudo bash && pulseaudio -k
sudo cp /etc/pulse/default.pa /etc/pulse/default.pa.bak
sudo cat <<EOT >> /etc/pulse/default.pa
load-module module-echo-cancel source_name=noechosource sink_name=noechosink