Skip to content

Instantly share code, notes, and snippets.

View snoop2head's full-sized avatar

snoop2head snoop2head

View GitHub Profile
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git
@humbhenri
humbhenri / get-images.py
Created January 1, 2014 18:43
Download images in parallel using python
from BeautifulSoup import BeautifulSoup
from functools import partial
from urllib import urlretrieve
from urlparse import urljoin, urlparse
import argparse
import multiprocessing
import os
import sys
import urllib2
@subfuzion
subfuzion / github-wiki-how-to.md
Last active March 13, 2025 09:40
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: [email protected]:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@tzmartin
tzmartin / embedded-file-viewer.md
Last active April 16, 2025 14:36
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@xnuk
xnuk / hyeong.md
Last active April 23, 2025 10:14
난해한 혀엉.... 언어

난해한 혀엉... 언어 v0.4.5

  • (U+2026), (U+22EF), (U+22EE)는 모두 .(U+002E)가 3번 연속으로 나열된 것과 같은 것으로 봅니다.
  • "한글 음절 문자"는 가(U+AC00) 이상 힣(U+D7A3) 이하의 유니코드 문자들을 의미합니다.

스택

@spikeekips
spikeekips / stopwords-ko.txt
Created January 13, 2017 07:32
Korean Stopwords
가까스로
가령
각각
각자
각종
갖고말하자면
같다
같이
// 언어 명세: https://gist.github.com/xnuk/d9f883ede568d97caa158255e4b4d069
// 아... 자괴감 온다....
//// 코드:
형. 흑.......... 항..........♥ 흣.......... 흑... 항. 혀엉.. 혀어어엉.. 하앗.
혀어어어어어엉...... 항. 혀어어엉... 혀엉.......... 하앙. 흣... 항. 혀어어엉.. 혀엉.....
혀어어어어어엉.. 하아앙. 혀어어엉.......... 혀어엉....... 하앙. 혀엉................ 항.
흑... 흣... 하아앙... 흑.......... 하앗. 혀엉..... 항. 흑.......... 흣..........
하아앙.......... 흐으윽... 흣... 형. 하아아아아앙... 흑..........♥ 히잇? 혀엉. 형..... 하앗.
흑... 하앙... 흐윽... 흣... 형. 하아아아앙... 흑.......... 하앙.......... 흑..........♥
@zhangpengGenedock
zhangpengGenedock / git clone specific commit branch
Created October 19, 2017 03:52
git clone specific commit branch
What else can you do?
How to clone repository to a specific commit? (full clone)
# Create empty repository to store your content
git clone <url>
git reset <sha-1> --hard
More info:
How to clone single branch?
@roycewilliams
roycewilliams / pwnedpasswords-v2-top20k.txt
Last active January 4, 2025 03:16
pwnedpasswords-v2-top20k.txt
#------------------------------------------------------------------------------
# Top 20K hashes from the Troy Hunt / haveibeenpwned Pwned Passwords list v2 (2018-02-21)
# with frequency count and cracked plaintext passwords
#
# The latest version of this file can be found here:
# https://gist.github.com/roycewilliams/281ce539915a947a23db17137d91aeb7
#
# NOTE: THIS FILE IS DEPRECATED.
# The equivalent of this file, but based on v6 of the Pwned Passwords, is here:
# https://gist.github.com/roycewilliams/226886fd01572964e1431ac8afc999ce
@weiaicunzai
weiaicunzai / accuracy.py
Created June 22, 2018 13:20
compute top1, top5 error using pytorch
from __future__ import print_function, absolute_import
__all__ = ['accuracy']
def accuracy(output, target, topk=(1,)):
"""Computes the precision@k for the specified values of k"""
maxk = max(topk)
batch_size = target.size(0)
_, pred = output.topk(maxk, 1, True, True)