Skip to content

Instantly share code, notes, and snippets.

View JSpiner's full-sized avatar
:octocat:
loop { eat sleep code }

정성민 JSpiner

:octocat:
loop { eat sleep code }
View GitHub Profile
@JSpiner
JSpiner / slack_oauth_guide.md
Last active November 12, 2023 10:40
Slack OAuth 인증방법
```
Serial port /dev/cu.usbserial-0001
Connecting......................................
A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
선택돤 시리얼 포트For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
는 존재하지 않거나 해당 보드가 연결되지 않았습니다.
```
[{"idDrink": "14029", "strDrink": "'57 Chevy with a White License Plate", "strVideo": null, "strCategory": "Cocktail", "strIBA": null, "strAlcoholic": "Alcoholic", "strGlass": "Highball glass", "strInstructions": "1. Fill a rocks glass with ice 2.add white creme de cacao and vodka 3.stir", "strDrinkThumb": "https://www.thecocktaildb.com/images/media/drink/qyyvtu1468878544.jpg", "strIngredient1": "Creme de Cacao", "strIngredient2": "Vodka", "strIngredient3": "", "strIngredient4": "", "strIngredient5": "", "strIngredient6": "", "strIngredient7": "", "strIngredient8": "", "strIngredient9": "", "strIngredient10": "", "strIngredient11": "", "strIngredient12": "", "strIngredient13": "", "strIngredient14": "", "strIngredient15": "", "strMeasure1": "1 oz white ", "strMeasure2": "1 oz ", "strMeasure3": " ", "strMeasure4": " ", "strMeasure5": " ", "strMeasure6": " ", "strMeasure7": " ", "strMeasure8": "", "strMeasure9": "", "strMeasure10": "", "strMeasure11": "", "strMeasure12": "", "strMeasure13": "", "strMeasure14":
@JSpiner
JSpiner / test.kt
Last active November 14, 2018 03:34
class Test {
fun testFunc(view: WebView, url: String): Boolean {
println("hi!")
for(i in 0..10) {
println("*")
}
}
fun testFunc2(view: WebView?, url: String): Boolean {
println("hi!")
@JSpiner
JSpiner / dispose.java
Last active September 1, 2018 14:29
dispose
CompositeDisposable disposable = new CompositeDisposable();
disposable.add(
Observable.just("hi").delay(1000, TimeUnit.MILLISECONDS).subscribe(data -> System.out.println("hi"))
);
disposable.dispose();
disposable.add(
Observable.just("hi").delay(1000, TimeUnit.MILLISECONDS).subscribe(data -> System.out.println("hi"))
@JSpiner
JSpiner / baseline.java
Last active July 14, 2018 03:45
짝코딩 실습 baseline
class Solution {
public Solution() {
}
public int[][] markMine(int n, int[][] map) {
#-*- coding: utf-8 -*-
from flask import Flask, request, make_response, Response
from flask import jsonify
import os
import json
import requests
from slackclient import SlackClient
<html>
<a href='https://slack.com/oauth/authorize?scope=channels:write+commands+bot+chat:write:bot+users:read+channels:read&client_id="+key['slackapp']['client_id']+"'><img alt='Add to Slack'
height='40' width='139' src='https://platform.slack-edge.com/img/add_to_slack.png'
srcset='https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/add_to_slack@2x.png 2x' /></a>
</html>
#client_id 는 공개가 되도 문제가없습니다.
@JSpiner
JSpiner / FlingBehavior.java
Created August 9, 2017 07:14
Smooth Scroll AppBarLayout FlingBehavior
public final class FlingBehavior extends AppBarLayout.Behavior {
private boolean isPositive;
private float mFlingFriction = ViewConfiguration.getScrollFriction();
private float DECELERATION_RATE = (float) (Math.log(0.78) / Math.log(0.9));
private final float INFLEXION = 0.35f;
private float mPhysicalCoeff;
#-*- coding: utf-8 -*-
from flask import Flask, request, make_response, Response
import os
import json
import requests
from slackclient import SlackClient
# Your app's Slack bot user token
SLACK_BOT_TOKEN = "xoxb-"