This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
<<COMMENT | |
✨ Simple Installation of the latest Brew, Cask, Git, Node.js, and visual-studio-code for OSX! | |
@Author: Minhyeok Jung | |
@License: MIT | |
[Example Usage] | |
Download this file, and from the directory, run in terminal | |
chmod +x configure-osx.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.holaxapps.chomdoi.support; | |
import org.junit.Test; | |
import java.security.KeyPair; | |
import java.security.NoSuchAlgorithmException; | |
import static org.assertj.core.api.Assertions.assertThat; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.holaxapps.chomdoi.support; | |
import javax.crypto.*; | |
import java.io.UnsupportedEncodingException; | |
import java.security.*; | |
import java.security.spec.InvalidKeySpecException; | |
import java.security.spec.PKCS8EncodedKeySpec; | |
import java.security.spec.X509EncodedKeySpec; | |
import java.util.Base64; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final String getKeyHash(Context context) { | |
try { | |
PackageInfo info = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES); | |
for (Signature signature : info.signatures) { | |
MessageDigest md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); | |
String keyHash = Base64.encodeToString(md.digest(), Base64.DEFAULT); | |
Logger.d(TAG + "KeyHash:%s", keyHash); | |
return keyHash; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Fibo { | |
private static final int MAX_COUNT = 10; | |
private static List<Integer> numbers = new ArrayList<Integer>(); | |
public static void main(String[] args) { | |
// Get | |
for(int i = 0 ; i < MAX_COUNT ; i++) { | |
numbers.add(fibo(i)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Marine { | |
private int level; | |
private String color; | |
public static final int type = 1; | |
public void upgradeWeapon(int weaponType, int itemLevel) { | |
int newLevel = level > itemLevel ? level : level + weaponType; | |
System.out.println("New Level is " + newLevel); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Settings.Secure.ANDROID_ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity | |
.... | |
.... | |
android:launchMode="singleTask" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<string name="joyple_facebook_application_id">{Facebook APP ID}</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String caption = "caption"; | |
String content = "content"; | |
System.out.println("caption = " + Integer.toHexString(caption.hashCode())); | |
System.out.println("content = " + Integer.toHexString(content.hashCode())); | |
System.out.println("contentOthers = " + Integer.toHexString(content.replace(content, "contentOthers").hashCode())); |
NewerOlder