Skip to content

Instantly share code, notes, and snippets.

@JozzyWeasel
JozzyWeasel / Joji Upgrade Guitar Tabs
Last active June 6, 2021 06:13
Joji - Upgrade Tabs
Artist: Joji
Song: Upgrade
Album: Nectar
Video Lesson: https://youtu.be/cFgXfaqZb8g
Tabbed by JozzyWeasel
---
Chords
@JohnnyJosep
JohnnyJosep / sign-verify.java
Last active September 28, 2024 21:58
Sample usage XAdES4j
package com.zertifika.test;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.security.KeyStore;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
#!/usr/bin/env ruby
require 'base64'
require 'nokogiri'
require 'uri'
def main
html = Nokogiri::HTML($stdin.read)
inline_all_images(html)
inline_all_css(html)

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@yang-wei
yang-wei / destructuring.md
Last active February 15, 2026 13:03
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
@muralisc
muralisc / vim_colorscheme_screenshots
Last active November 21, 2017 00:22
A quick script for creating screenshots of colorschemes in "flazz/vim-colorschemes"
#!/bin/bash
geo=235x65+0+0
cSchemes=`ls -1 ~/.vim/bundle/vim-colorschemes/colors | sed 's/.vim$//'`
for currentScheme in $cSchemes
do
sed -i "s/^colorscheme .*/colorscheme $currentScheme/" ~/.vimrc
urxvt --geometry $geo -e vim ~/.vimrc &
pid=$!
sleep 0.25 # VERY IMPORTANT for this gap for the window to form
# sometimes the status bar wont apprear . Press 'j' to make it appear
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active March 14, 2026 05:26
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname