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
```
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) {
@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
from flask import jsonify
import os
import json
import requests
from slackclient import SlackClient
#-*- 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-"
@JSpiner
JSpiner / mysqldump.sh
Created April 18, 2017 07:22
db backup script
#db dump script
#ex) mysqldump -uroopt -p1234 db > "dbbackup_$(date '+%Y-%m-%d').sql"
#result : dbbackup_2017-04-18.sql
mysqldump -uID -pPW DBNAME > "dbbackup_$(date '+%Y-%m-%d').sql"
class DictDiffer(object):
def __init__(self, past_dict, current_dict):
self.current_dict, self.past_dict = current_dict, past_dict
self.set_current, self.set_past = set(current_dict.keys()), set(past_dict.keys())
self.intersect = self.set_current.intersection(self.set_past)
def added(self):
return self.set_current - self.intersect
def removed(self):