Skip to content

Instantly share code, notes, and snippets.

View JimJeon's full-sized avatar
🐧
penguins

Jim Jeon JimJeon

🐧
penguins
View GitHub Profile
@ityonemo
ityonemo / test.md
Last active October 23, 2025 01:27
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@jeremybise
jeremybise / baseof.html
Last active August 3, 2025 13:34
Google Fonts via config with Hugo
<!-- Wherever your head tag is located, add the new partial -->
<head>
{{ partial "google-fonts" . }}
</head>
import re
import itertools
from bs4 import BeautifulSoup
import requests
import scrapy
def xpath_soup(element):
"""
Generate xpath from BeautifulSoup4 element
:param element: BeautifulSoup4 element.
@eddiewebb
eddiewebb / readme.md
Last active August 7, 2025 09:16
Hugo JS Searching with Fuse.js
@shettayyy
shettayyy / pre-commit-eslint
Last active December 10, 2021 05:27
Pre-commit hook for Linting JS with ESLint before commit.
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
ESLINT="$(git rev-parse --show-toplevel)/node_modules/.bin/eslint"
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true
@camilstaps
camilstaps / WritingPseudocode.md
Last active June 12, 2025 08:54
How to write good pseudocode

How to write good Pseudocode

This is an unfinished list of remarks on how to write good pseudocode.

What is pseudocode?

Pseudocode is a loosely defined way of transmitting the concept of an algorithm from a writer to a reader. Central is the efficiency of this communication, not the interpretability of the code by an automated program (e.g., a parser).

@linhmtran168
linhmtran168 / pre-commit-eslint
Last active July 6, 2025 08:17
Pre-commit hook to check for Javascript using ESLint
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true
@ozzieperez
ozzieperez / NumericValidationTrigger.cs
Last active February 3, 2017 14:35
Xamarin.Forms Trigger Example
// Visual elements can react to events or property changes.
// Triggers can be thought of for "conditional styles".
// Types: Trigger, EventTrigger, DataTrigger, MultiTrigger
//EXAMPLE: hooking trigger to a property
//You have a trigger that fires when a property changes
//create the trigger
var trigger = new Trigger(typeof(Entry));
trigger.Property = Entry.IsFocusedProperty; // hooked to the "IsFocused" property!
@rudyryk
rudyryk / Badge.cs
Last active September 5, 2024 09:51
C# — Xamarin.Forms custom simple badge view + rounded box view via custom renderer
//
// Badge.cs
// Created by Alexey Kinev on 19 Jan 2015.
//
// Licensed under The MIT License (MIT)
// http://opensource.org/licenses/MIT
//
// Copyright (c) 2015 Alexey Kinev <alexey.rudy@gmail.com>
//
using System;
@staltz
staltz / introrx.md
Last active October 26, 2025 03:06
The introduction to Reactive Programming you've been missing