Skip to content

Instantly share code, notes, and snippets.

View ajchemist's full-sized avatar
🕶️

ajchemist

🕶️
  • Korean Peninsula
View GitHub Profile
@ajchemist
ajchemist / vscode-debug-current.md
Created April 1, 2023 14:14 — forked from ehaynes99/vscode-debug-current.md
VSCode debugging current typescript file

Debugging TypeScript with ts-node in VSCode

These launch configs will allow you to debug typescript files directly from VSCode. It will honor the tsconfig and resolve node modules properly. You do not need to install ts-node or nodemon, as everything is run using npx. The first

Launch Config

{
  "configurations": [
    {
      "type": "node",
      "request": "launch",
@ajchemist
ajchemist / llama_sizes.txt
Created April 1, 2023 11:38 — forked from shawwn/llama_sizes.txt
The size of each file distributed with LLaMA, for reference. See https://github.com/shawwn/llama-dl
./tokenizer_checklist.chk 50
./tokenizer.model 499723
./7B/checklist.chk 100
./7B/consolidated.00.pth 13476939516
./7B/params.json 101
./13B/checklist.chk 154
./13B/consolidated.00.pth 13016334699
./13B/consolidated.01.pth 13016334699
./13B/params.json 101
./30B/checklist.chk 262
(ns build
(:require
[clojure.java.io :as jio]
[clojure.string :as str]
[buddy.core.codecs :as codecs]
[buddy.core.hash :as hash]
))
(set! *warn-on-reflection* true)
@ajchemist
ajchemist / pass.md
Created August 21, 2021 12:44 — forked from abtrout/pass.md
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@ajchemist
ajchemist / AuthyToOtherAuthenticator.md
Created August 20, 2021 02:13 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the

@ajchemist
ajchemist / github-context.json
Created March 21, 2021 06:17 — forked from colbyfayock/github-context.json
Sample payload for Github Action `github` context
{
"token": "[token]",
"job": "notifySlack",
"ref": "refs/pull/4/merge",
"sha": "[shad]",
"repository": "colbyfayock/demo-github-actions",
"repository_owner": "colbyfayock",
"repositoryUrl": "git://github.com/colbyfayock/demo-github-actions.git",
"run_id": 120667610,
"run_number": "2",
@ajchemist
ajchemist / _.md
Created December 26, 2020 12:52 — forked from mhuebert/_.md
shadow-cljs build hook for purgecss

purgecss is a tool for removing unused css classes from source files. It's particularly useful for functional css frameworks like tachyons, where it's normal to only use a tiny fraction of available classes. This gist contains example code you could use to add purgecss to a shadow-cljs build.

  • make sure to yarn add purgecss first
  • usage is (hooks/purge-css {:css-source __ :js-globs __ :out-dir __})
    • :css-source is the path to the original, bloated CSS file (from project root). This is ideally in a source directory, or node_modules as in this example. This cannot be the public path where the css is ultimately read.
  • :js-globs is a string / vector of strings, indicating which files to read as input. These should be all of your compiled javascript bundles which contain your views. purgecss does a brute-force parse of all these files, extracting all the strings to figure out which clas
@ajchemist
ajchemist / Unbrick_Buffalo_WZR-HP-G300NH.md
Created April 6, 2019 07:57 — forked from pjobson/Unbrick_Buffalo_WZR-HP-G300NH.md
How to Unbrick the Buffalo WZR-HP-G300NH

Unbricking a Buffalo WZR-HP-G300NH

TFTP recovery in OSX 10.12

Similar steps can be used under Linux, I have no idea how to Windows anymore. This will probably work for similar Buffalo WZR routers, though your milage may vary. These directions flash the router back to stock Buffalo branded DDWRT.

When these routers brick they tend to go into a kind of reboot mode. At the begining of the reboot, the TFTP server is available for a brief period of time, then all of the lights flash and the unit reboots. We're exploiting the short period of time where the router is in TFTP mode at the start of the reboot. You can try to do a put via TFTP at the begining of this cycle, even if your router has been plugged in for awhile.

Back to Stock Buffalo Branded DDWRT

WinRM 사용 정리

WinRM 초기 설정

  • PowerShell (Run as Administrator)
# Service Enable 
winrm qc 

# 인증 및 AllowUnencrypted 설정 
@ajchemist
ajchemist / emacs-pkg-install.sh
Created March 17, 2019 15:34 — forked from padawanphysicist/emacs-pkg-install.sh
Install emacs packages from the command-line
#!/bin/bash
#
# I wrapped the code constructed in
#
# http://hacks-galore.org/aleix/blog/archives/2013/01/08/install-emacs-packages-from-command-line
#
# in a single bash script, so I would a single code snippet.
#
# Package to be installed