Skip to content

Instantly share code, notes, and snippets.

View metalg0su's full-sized avatar
😀

Seongjun Ji metalg0su

😀
View GitHub Profile
@dongbum
dongbum / cmake-tutorial.md
Created September 25, 2019 17:38 — forked from luncliff/cmake-tutorial.md
CMake 할때 쪼오오금 도움이 되는 문서

CMake를 왜 쓰는거죠?
좋은 툴은 Visual Studio 뿐입니다. 그 이외에는 전부 사도(邪道)입니다 사도! - 작성자

주의

  • 이 문서는 CMake를 주관적으로 서술합니다
  • 이 문서를 통해 CMake를 시작하기엔 적합하지 않습니다
    https://cgold.readthedocs.io/en/latest/ 3.1 챕터까지 따라해본 이후 기본사항들을 속성으로 익히는 것을 돕기위한 보조자료로써 작성되었습니다
@luncliff
luncliff / cmake-tutorial.md
Last active April 29, 2024 07:48
CMake 할때 쪼오오금 도움이 되는 문서

CMake를 왜 쓰는거죠?
좋은 툴은 Visual Studio 뿐입니다. 그 이외에는 전부 사도(邪道)입니다 사도! - 작성자

주의

  • 이 문서는 CMake를 주관적으로 서술합니다
  • 이 문서를 통해 CMake를 시작하기엔 적합하지 않습니다
    https://cgold.readthedocs.io/en/latest/ 3.1 챕터까지 따라해본 이후 기본사항들을 속성으로 익히는 것을 돕기위한 보조자료로써 작성되었습니다
@andre3k1
andre3k1 / install-gnu-sed-on-mac-osx.sh
Created July 26, 2018 18:39
How to install gnu sed on Mac OS X and set it as the default
# Check which version of sed is used when you run the `sed` command
# The version that ships with Mac OS X is
# /usr/bin/sed
which sed
# Install gnu-sed using Homebrew
# The `--with-default-names` option configures `sed` to use gnu-sed
# Without that option, you'll need to type `gsed` to use gnu-sed
brew install --default-names gnu-sed
@joseluisq
joseluisq / stash_dropped.md
Last active March 28, 2024 11:59
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

@gbaman
gbaman / graphql_example.py
Created November 1, 2017 00:18
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
if request.status_code == 200:
@rossharper
rossharper / ParameterizedKotlinTest.kt
Created February 20, 2016 21:51
Parameterized JUnit4 test example in Kotlin
@RunWith(Parameterized::class)
class KotlinTest(val paramOne: Int, val paramTwo: String) {
companion object {
@JvmStatic
@Parameterized.Parameters
fun data() : Collection<Array<Any>> {
return listOf(
arrayOf(1, "I"), // First test: (paramOne = 1, paramTwo = "I")
arrayOf(1999, "MCMXCIX") // Second test: (paramOne = 1999, paramTwo = "MCMXCIX")
@rg3915
rg3915 / gen_random_datetime.py
Last active February 18, 2023 15:09
Generate Random Datetime Python
import random
from datetime import datetime, timedelta
min_year=1900
max_year=datetime.now().year
start = datetime(min_year, 1, 1, 00, 00, 00)
years = max_year - min_year+1
end = start + timedelta(days=365 * years)
@TrevorS
TrevorS / git-tree-alias.sh
Created March 27, 2014 14:47
git tree alias.
git config --global alias.tree "log --graph --decorate --pretty=oneline --abbrev-commit"
@sli
sli / hexmap.py
Created November 24, 2011 22:14
Hexmap Generator (PyGame)
import sys
import pygame
from pygame.locals import *
##### Rendering Fuctions #####
def drawGrid(context, width, height, cell_size):
column = 1
row = 0
at = 0