Skip to content

Instantly share code, notes, and snippets.

@zmwangx
zmwangx / No longer able to make public gists secret.md
Last active June 2, 2025 13:45
No longer able to make public gists private — message to GitHub

We've been able to toggle visibility of gists since 2014 (https://github.com/blog/1837-change-the-visibility-of-your-gists), but I just noticed that I can no longer make public gists private. That is, when I edit private gists I still see the "Make Public" button, but not the other way round — there's only a "Delete" button when I edit public gists; the "Make Secret" which should be next to it (as shown in the screencast in the linked blog post) is nowhere to be found. I made a screenshot and a screencast demonstrating the issue, both of which are attached. Could you please confirm this issue? Was this an intentional change, and why? Thank you for your attention.

gist-unable-to-make-secret

![gist-unable-to-make-secret](https://cloud.githubusercontent.com/assets/4149852/16898407/c76db210-4c0b-11e6-9108-0450f1edebb4.gif)
@CMCDragonkai
CMCDragonkai / difference_lists.md
Last active June 10, 2022 16:35
Haskell: Difference Lists Used for Concatenating Strings Efficiently

Difference Lists

Consider the problem of appending strings:

> "first" ++ "second" ++ "third"
"firstsecondthird"
@desbo
desbo / scan.js
Last active February 4, 2020 17:13
javascript scan function
function scan(xs, f, acc) {
var result = [];
for (var i = 0; i < xs.length; i++) {
acc = result[result.push(f(acc, xs[i])) - 1];
}
return result;
}
@msjang
msjang / gist.md
Last active January 27, 2023 01:46
GitHub Gist 소개

GitHub Gist 소개

GitHub Gist는 GitHub과는 달리, private도 무료입니다. 저는 주로 코드조각(Code Snippet), 로그, 메모 등을 남기는데 사용합니다.

@ihoneymon
ihoneymon / how-to-write-by-markdown.md
Last active June 1, 2025 10:24
마크다운(Markdown) 사용법

[공통] 마크다운 markdown 작성법

영어지만, 조금 더 상세하게 마크다운 사용법을 안내하고 있는
"Markdown Guide (https://www.markdownguide.org/)" 를 보시는 것을 추천합니다. ^^

아, 그리고 마크다운만으로 표현이 부족하다고 느끼신다면, HTML 태그를 활용하시는 것도 좋습니다.

1. 마크다운에 관하여

@max-mapper
max-mapper / 0.md
Last active May 12, 2025 13:51
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)

@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active June 5, 2025 11:59
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@shoveller
shoveller / gist:b4d2e1e6d33906f2a667
Created July 3, 2014 14:06
왜 파이썬 데코레이터를 만들때, @wraps어노테이션을 쓰는 것을 권장하는 걸까?
__author__ = 'artemr'
'''
왜 파이썬 데코레이터를 만들때, @wraps어노테이션을 쓰는 것을 권장하는 걸까?
이유인 즉슨, 데코레이터 내부에서 인자로 전달받은 함수가 익명함수 처럼 취급되어 버리므로 디버깅이 난해해지는 단점이 있었기 때문이다.
자세한 설명은 아래의 링크에 첨부되어 있다.
원본: http://artemrudenko.wordpress.com/2013/04/15/python-why-you-need-to-use-wraps-with-decorators/
사본: https://www.evernote.com/shard/s174/sh/78eaad5f-a8f2-4496-b984-e3385fb963c0/922d9ab4b5cd23ac7b85aab42536aa4f
'''
@jakemmarsh
jakemmarsh / binarySearchTree.py
Last active May 1, 2025 01:41
a simple implementation of a Binary Search Tree in Python
class Node:
def __init__(self, val):
self.val = val
self.leftChild = None
self.rightChild = None
def get(self):
return self.val
def set(self, val):