Skip to content

Instantly share code, notes, and snippets.

View jisungbin's full-sized avatar
🌴
언어의 정원사

Ji Sungbin jisungbin

🌴
언어의 정원사
  • 여의도 (South Korea)
  • South Korea, Seoul
  • 17:13 (UTC +09:00)
View GitHub Profile
public static int dp2px(Context ctx, float dp) {
final float scale = ctx.getResources().getDisplayMetrics().density;
return (int) (dp * scale + 0.5f);
}
public static int px2dp(Context ctx, float px) {
final float scale = ctx.getResources().getDisplayMetrics().density;
return (int) (px / scale + 0.5f);
}
importPackage(android.content);
importPackage(android.app);
importClass(android.widget.Toast);
importClass(android.graphics.drawable.Icon);
const CHANNEL_ID = "call_owner";
const ignoreActionName = "msgbot.call_owner.ignore";//그냥 시스템 전반적으로 유니크하게 하시면 됩니다.
const replyActionName="msgbot.call_owner.reply";
const replyKey="key_reply";
const bot = BotManager.getCurrentBot();
anonymous
anonymous / Quickbms script files.md
Created July 10, 2017 00:16
Quickbms script files

File: Download Quickbms script files   Unpack quickbms.zip into your Mad Max directory. That's probably here - C:\Program Files (x86)\Steam\steamapps\common\Mad Max Also place the justcause2.bms script A Windows Script File (WSF) is a file type used by the Microsoft Windows Script Host. It allows mixing the scripting languages JScript and VBScript within a single The BMS script even reads it, but it does nothing with it. You'll also need quickbms.exe and all the PAK files in the same directory for this to work. Script by CriticalError Game: Sanjie Online For unpack you need QuickBMS Tool. PHP Code: #Sanjie Online PAK Unpacker idstring PAKF Script by aluigi Game: Xian Xia Chuan For unpack you need QuickBMS Tool. PHP Code: idstring vfs goto 0x18 get INFO_OFF long Crea

importPackage(android.content);
importPackage(android.app);
const CHANNEL_ID = "test channel";
const actionName="myawesomemsgbot.buttonClick";//그냥 시스템 전반적으로 유니크하게 하시면 됩니다.
const bot = BotManager.getCurrentBot();
let receiver = new BroadcastReceiver({
onReceive: function(ctx, intent){
let action = intent.getAction();
if(action.equals(actionName)){
Log.info("btn click");
🌞 Morning 90 commits ███▏░░░░░░░░░░░░░░░░░ 15.3%
🌆 Daytime 201 commits ███████▏░░░░░░░░░░░░░ 34.1%
🌃 Evening 203 commits ███████▏░░░░░░░░░░░░░ 34.5%
🌙 Night 95 commits ███▍░░░░░░░░░░░░░░░░░ 16.1%
issuance:
unblinded hex:
0200000000016f29544961475963d1f766ff4e0329b8112b996ccf7fd6c79b35340aed616c340100008000ffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000006fc23ac000100000000000000010301018c407b189cf5cf30d69fe5a8146c0286bf786f822ffa2216abc92c306825430100000006fc23ac00001600140fe0b04334565422963f1da0d9958d7b45d3102c010ff135b4ab4b8684ae573c142b075fcba80512400e526c13ec7d3f812ec70d53010000000000000001001600140fe0b04334565422963f1da0d9958d7b45d3102c0125b251070e29ca19043cf33ccd7324e2ddab03ecc4ae0b5e77c4fc0e5cf6c95a010000000005f5d160001600140fe0b04334565422963f1da0d9958d7b45d3102c00000000
blinded hex:
0200000001016f29544961475963d1f766ff4e0329b8112b996ccf7fd6c79b35340aed616c340100008000ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009a6426b43d7c5c13414bb489d7edf47dc2a319c781ca3bb1f05077f93ab7ba2fe0842d74b3b53bc5e13fa4b35
set srcFile to ((path to desktop) as text) & "dialog.txt"
set lns to paragraphs of (read file srcFile as «class utf8»)
repeat with ln in lns
my stringToClipboard(ln)
tell application "KakaoTalk" to activate
tell application "System Events"
keystroke "v" using command down
key code 36
delay 1.5
@jinsangYoo
jinsangYoo / npm-save-save-dev-different.md
Last active June 14, 2021 13:48
npm --save, --save-dev의 차이점
  • 그냥 install 하면 ./node_modules 디렉터리에 패키지 설치를 하고 끝.

  • --save, --save-dev 옵션은 ./package.json 업데이트를 같이해준다.

    • 어디에 패키지 정보를 추가하느냐가 다른데, --save 옵션은 dependencies object에 추가하고 --save-dev 옵션은 devDepenencies object에 추가한다.
  • dependencies와 devDepenencies 차이는 npm install을 할 때 나타난다.

    • dependencies는 항상 설치되고
    • devDepenencies는 --production 옵션을 붙이면 빠진다.
  • npm install “$package” 명령어로 설치할 때는 --dev 옵션을 붙여야지만 설치된다.

출처

/******************
* minesweeper.js *
******************
*
* So much for Asimov's Laws. They're actually trying to kill
* you now. Not to be alarmist, but the floor is littered
* with mines. Rushing for the exit blindly may be unwise.
* I need you alive, after all.
*
* If only there was some way you could track the positions
@ryanamaral
ryanamaral / DaggerBottomSheetDialogFragment.kt
Created July 25, 2018 21:11
DaggerBottomSheetDialogFragment
import android.content.Context
import android.support.design.widget.BottomSheetDialogFragment
import android.support.v4.app.Fragment
import dagger.android.AndroidInjector
import dagger.android.DispatchingAndroidInjector
import dagger.android.support.AndroidSupportInjection
import dagger.android.support.HasSupportFragmentInjector
import javax.inject.Inject