Skip to content

Instantly share code, notes, and snippets.

View zlargon's full-sized avatar
:electron:
Focusing

Leon Huang zlargon

:electron:
Focusing
  • Boston, MA
View GitHub Profile
@zlargon
zlargon / windows_iso_download.js
Last active March 14, 2024 11:11
Official Windows ISO Download Hacking
// https://www.microsoft.com/zh-tw/software-download/windows10ISO
document.getElementById("product-edition").innerHTML = `
<option value='' selected='selected'>選取版本</option>
<option value='2'>Windows 7 Home Basic SP1 </option>
<option value='4'>Windows 7 Professional SP1 </option>
<option value='6'>Windows 7 Home Premium SP1 </option>
<option value='8'>Windows 7 Ultimate SP1 </option>
<option value='10'>Windows 7 Home Premium N SP1 </option>
<option value='12'>Windows 7 Professional N SP1 </option>
@zlargon
zlargon / [Eclipse] xcode theme.xml
Created December 8, 2014 05:54
The Xcode Style Eclipse IDE Theme
<?xml version="1.0" encoding="utf-8"?>
<colorTheme id="11666" name="XCode - Dusk - Actual" modified="2012-10-31 16:08:07" author="mechatronic">
<searchResultIndication color="#616161" />
<filteredSearchResultIndication color="#616161" />
<occurrenceIndication color="#616161" />
<writeOccurrenceIndication color="#616161" />
<findScope color="#E0E2E4" />
<deletionIndication color="#E0E2E4" italic="true" />
<sourceHoverBackground color="#000000" />
<singleLineComment color="#41B644" />
#!/usr/bin/env node
const { Alchemy, Network } = require('alchemy-sdk');
const ethers = require('ethers');
const EthDater = require('ethereum-block-by-date');
const config = {
apiKey: '3zNbANvcjr5yUHtnGKxXGdnX3dUYxL2X',
network: Network.ETH_MAINNET,
};
@zlargon
zlargon / alferd-backup.sh
Last active September 16, 2022 21:04
[alfred] backup customized web search
#!/bin/bash
# create alfred-backup folder
mkdir -p alfred-backup/preferences/features/websearch
# prefs.plist
cp ~/Library/Application\ Support/Alfred/Alfred.alfredpreferences/preferences/features/websearch/prefs.plist \
alfred-backup/preferences/features/websearch
# resources (images)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Gist HTML Preview</title>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta http-equiv='Content-Type' content='text/html; charset=utf8'/>
<meta name='apple-mobile-web-app-capable' content='yes'/>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<style type="text/css">
# https://gist.github.com/spicycode/1229612
# https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html
# 0 is too far from `
set -g base-index 1
# detach
bind -n C-e detach-client
# create new tab
@zlargon
zlargon / speed_up_mp3.md
Last active April 15, 2020 00:43
Speed up mp3 file by FFmpeg on Mac
@zlargon
zlargon / EnvVars.bat
Created December 29, 2019 13:59
Open Windows "EditEnvironmentVariables" Panel
:: https://serverfault.com/a/351154
cmd /c "start rundll32 sysdm.cpl,EditEnvironmentVariables"
# get env var
function get_env() {
VAR=$(grep ${1} .env)
echo ${VAR#*=}
}
InvoiceLineId InvoiceId TrackId UnitPrice Quantity
1 1 2 0.99 1
2 1 4 0.99 1
3 2 6 0.99 1
4 2 8 0.99 1
5 2 10 0.99 1
6 2 12 0.99 1
7 3 16 0.99 1
8 3 20 0.99 1
9 3 24 0.99 1