Skip to content

Instantly share code, notes, and snippets.

View sangwoo-joh's full-sized avatar
🐫

Sangwoo Joh sangwoo-joh

🐫
View GitHub Profile
@toolness
toolness / sshify.py
Created March 14, 2017 20:31
A script to run a command within an ssh-agent session.
#! /usr/bin/env python3
"""
This utility will execute the given command (by default, your shell)
in a subshell, with an ssh-agent process running and your
private key added to it. When the subshell exits, the ssh-agent
process is killed.
"""
# This code was written by Atul Varma in February 2017. It requires
@lifthrasiir
lifthrasiir / inquiry.md
Last active July 30, 2019 13:15
"ꡬ글, 'https' 채택 μ•ˆν•œ λˆ„λ¦¬μ§‘μ— μ•ˆμ „ν•˜μ§€ μ•Šμ€ κ³³ '낙인'" 기사에 λŒ€ν•œ 의견

μ•„λž˜ 메일은 2017-02-12 21:43(μ΄ν•˜ ν•œκ΅­ ν‘œμ€€μ‹œ)에 ν•œκ²¨λ ˆ 기사에 λŒ€ν•œ μ˜κ²¬μœΌλ‘œμ„œ 기사에 μ œμ‹œλœ κΉ€μž¬μ„­ 기자의 λ©”μΌλ‘œ 보낸 λ‚΄μš©μ΄λ‹€. λ©”μΌμ—μ„œ 사싀 관계 λ“±μ˜ 였λ₯˜κ°€ μžˆλ‹€λ©΄ λͺ¨λ‘ λ‚˜μ˜ μ‹€μˆ˜μ΄λ‹€.

2017-02-13 14:53에 λ§λΆ™μž„: 더 이상 gistλ₯Ό λΉ„κ³΅κ°œλ‘œ ν•  μ΄μœ κ°€ μ—†μ–΄μ‘ŒμœΌλ―€λ‘œ 곡개둜 μ „ν™˜. 이 메일에 λŒ€ν•œ 닡변은 λ°›μ•˜μœΌλ‚˜ κ³΅κ°œν•  만큼 μ€‘μš”ν•œ 반둠이 λ“€μ–΄ μžˆμ§„ μ•ŠμœΌλ©° 곡개 여뢀도 묻지 μ•Šμ•˜μœΌλ―€λ‘œ κ³΅κ°œν•˜μ§€ μ•ŠλŠ”λ‹€. μ•„λž˜ κΈ€ μžμ²΄μ—λ„ λ‹€μ–‘ν•œ λΉ„λ¬Έκ³Ό μ˜€μžκ°€ μžˆμœΌλ‚˜ 본래 보낸 λ‚΄μš©μ„ 살리기 μœ„ν•΄ μ „ν˜€ μˆ˜μ •μ„ ν•˜μ§€ μ•ŠκΈ°λ‘œ ν–ˆμŒμ„ μ–‘ν•΄ λ°”λžŒ.

2017-02-13 19:00에 λ§λΆ™μž„: 이 κΈ°μ‚¬μ˜ ν›„μ†μœΌλ‘œ ꡬ글코리아 츑의 κΈ°μžκ°„λ‹΄νšŒκ°€ μ˜¬λΌκ°”λ‹€. μƒˆ 기사에 λŒ€ν•΄μ„œλŠ” νŠΉμ΄ν•œ 게 μ—†μœΌλ―€λ‘œ λ…Έμ½”λ©˜νŠΈ. λ˜ν•œ μœ„μ˜ 기사 링크λ₯Ό λ―Έλ””μ–΄λ‹€μŒμ—μ„œ ν•œκ²¨λ ˆ μ›Ήμ‚¬μ΄νŠΈλ‘œ 가도둝 μˆ˜μ •.

원문

μ•ˆλ…•ν•˜μ‹­λ‹ˆκΉŒ, κ·€ν•˜κ»˜μ„œ μž‘μ„±ν•˜μ‹  (λ¬Όλ‘  μ €λŠ” κ·Έ μ§„μœ„λ₯Ό μ•Œ 수 μ—†μŠ΅λ‹ˆλ‹€λ§Œ, 적어도 κ·Έλ ‡κ²Œ λ‚˜μ™€ μžˆλŠ”) 기사에 λŒ€ν•œ μ˜κ²¬μ„ μ œκΈ°ν•˜κ³ μž 메일을 μ”λ‹ˆλ‹€. 이 메일은 μ €μ˜ 개인 의견이며 μ €λ₯Ό κ³ μš©ν•˜κ³  μžˆλŠ” νšŒμ‚¬λ‚˜ 단체 λ“±μ˜ μ˜κ²¬μ„ μ „ν˜€ λŒ€λ³€ν•˜μ§€ μ•ŠμŒμ„ ν˜Ήμ‹œλ‚˜ μ‹Άμ§€λ§Œ 미리 λ°ν˜€ λ‘‘λ‹ˆλ‹€.

unspecified.cpp

이 λ¬Έμ„œλŠ” μ œκ°€ νŠΈμœ„ν„°μ— λƒˆλ˜ 문제의 ν•΄μ„€μž…λ‹ˆλ‹€.

#include <vector>

using std::vector;

int main() {
@Earnestly
Earnestly / c99_ub_list.rst
Last active May 1, 2025 14:29
C99 List of Undefined Behavior (193 Cases)

C99 List of Undefined Behavior

From N1256: (See http://port70.net/~nsz/c/c99/n1256.html#J.2)

  • A "shall" or "shall not" requirement that appears outside of a constraint is violated (clause 4).
  • A nonempty source file does not end in a new-line character which is not immediately preceded by a backslash character or ends in a partial preprocessing token or comment (5.1.1.2).
  • Token concatenation produces a character sequence matching the syntax of a universal character name (5.1.1.2).
  • A program in a hosted environment does not define a function named main using one of the specified forms (5.1.2.2.1).
  • A character not in the basic source character set is encountered in a source file, except in an identifier, a character constant, a string literal, a header name, a comment, or a preprocessing token that is never converted to a token (5.2.1).
  • An identifier, comment, string literal, character constant, or header name contains an invalid multibyte character or does not
@kseo
kseo / recon.ml
Last active October 1, 2024 17:28
A Hindley-Milner type inference implementation in OCaml
#! /usr/bin/env ocamlscript
Ocaml.ocamlflags := ["-thread"];
Ocaml.packs := [ "core" ]
--
open Core.Std
type term =
| Ident of string
| Lambda of string * term
| Apply of term * term
@rxaviers
rxaviers / gist:7360908
Last active July 23, 2025 02:46
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@gnarf
gnarf / ..git-pr.md
Last active June 20, 2025 11:04
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 24, 2025 05:26
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@harlantwood
harlantwood / push_to_github.rb
Created June 15, 2012 07:27
Commit and push via Github REST API, from ruby RestClient
# Committing changes to a repo via the Github API is not entirely trivial.
# The five-step process is outlined here:
# http://developer.github.com/v3/git/
#
# Matt Swanson wrote a blog post translating the above steps into actual API calls:
# http://swanson.github.com/blog/2011/07/23/digging-around-the-github-api-take-2.html
#
# I was not able to find sample code for actually doing this in Ruby,
# either via the HTTP API or any of the gems that wrap the API.
# So in the hopes it will help others, here is a simple function to