Skip to content

Instantly share code, notes, and snippets.

View shcatlee's full-sized avatar

Seunghwan Lee shcatlee

View GitHub Profile
@ninanung
ninanung / login-with-github.md
Last active September 20, 2023 16:16
Github로 로그인하기!

Github로 로그인하기 feat.Vue and Node.js

1. Github로 로그인하기?

요즘들어 "~로 로그인하기" 가 많아지고 있다. 페이스북이나 구글이 대표적이고, 한국에서는 네이버도 많이 사용하며 개발자 관련 웹에서는 깃허브도 껴있는 경우가 많다. 이런 식의 다른 서비스를 통해 인증하는 방식을, OAuth 인증 방식이라고 하는 모양이다. 내가 회사 업무를 위해 사용하는 몇몇 소프트웨어도 이러한 인증을 지원하는 경우가 많다. 이 글에서는 그러한 인증을 구현하지는게 아니라 그러한 인증을 사용해 보자는 것에 목적을 둔다. 어떤 방식으로 인증하는지를 직접 사용해보고 OAuth방식 인증의 절차를 알아보는 기회도 될것이다.

2. 목표

목표
위와 같이 버튼을 누르면 Github에서 인증을 실행하고 관련 데이터를 받아오는 동작을 구현해 볼 것이다.

@rgabs
rgabs / react-redux.js
Last active May 10, 2021 06:31
No need to export mapStateToProps and mapDispatchToProps for testing connected components!!
// This mock will make sure that we are able to access mapStateToProps, mapDispatchToProps and reactComponent in the test file.
// To use this, just do `jest.mock('react-redux');` in your page.test.js file.
const mockDispatch = jest.fn((action) => action);
module.exports = {
connect: (mapStateToProps, mapDispatchToProps) => (reactComponent) => ({
mapStateToProps,
mapDispatchToProps: (dispatch = mockDispatch, ownProps) => mapDispatchToProps(dispatch, ownProps),
reactComponent,
@extremecoders-re
extremecoders-re / qemu-networking.md
Last active April 8, 2026 08:28
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@naesheim
naesheim / buildWhenAffected.sh
Last active December 7, 2025 19:59
CircleCi - only build features that has changed
##################
### config.yml ###
##################
version: 2
jobs:
build:
docker:
- image: circleci/python:3.6
steps:
@Robyer
Robyer / maven-publish-helper-usage.gradle
Last active February 20, 2025 14:37
Gradle script for publishing Android library with sources and javadoc to Maven repository using maven-publish plugin.
// You can use maven-publish-helper.gradle script without changes and even share it between multiple
// modules. Just place the maven-publish-helper.gradle file in the root directory of your project,
// then apply it at the bottom of your module's build.gradle file like this:
// ...content of module's build.gradle file...
apply from: '../maven-publish-helper.gradle'
publishing {
publications {
@illepic
illepic / private-github-release-download.sh
Last active November 4, 2025 16:13
Download the latest release binary from a private GitHub repo. (i.e. a .tar.gz that you have manually uploaded in a GitHub release). Update OAUTH_TOKEN, OWNER, REPO, FILE_NAME with your custom values.
#!/usr/bin/env bash
# Authorize to GitHub to get the latest release tar.gz
# Requires: oauth token, https://help.github.com/articles/creating-an-access-token-for-command-line-use/
# Requires: jq package to parse json
# Your oauth token goes here, see link above
OAUTH_TOKEN="34k234lk234lk2j3lk4j2l3k4j2kj3lk"
# Repo owner (user id)
OWNER="your-user-name"
@albulescu
albulescu / download.go
Created March 25, 2016 09:44
golang download file with progress
package main
/**
* @website http://albulescu.ro
* @author Cosmin Albulescu <cosmin@albulescu.ro>
*/
import (
"bytes"
"fmt"
@MinhasKamal
MinhasKamal / github markdown syntax.md
Last active August 12, 2025 10:03
Markdown Syntax for GitHub.
@maxim
maxim / gh-dl-release
Last active December 31, 2025 12:22
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@shimizukawa
shimizukawa / README.rst
Last active July 28, 2019 15:19
Sphinx with Markdown !!

Limitations

CommonMark-py supports syntax of CommonMark. So, CommonMark-py doesn't support sphinx/reST role and directives.

References