Skip to content

Instantly share code, notes, and snippets.


Sam Seay samueljseay

View GitHub Profile
tinmegali / AppDatabse.kt
Last active May 4, 2021
Android Room @TypeConverter using Kotlin
View AppDatabse.kt
@Database(entities = arrayOf(Note::class, User::class), version = 1)
abstract class AppDatabse : RoomDatabase() {
abstract fun userDAO(): UserDAO
abstract fun noteDAO(): NoteDAO
samueljseay /
Created Jun 2, 2017
ES6 exports / imports cheat sheet
// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}
View ethos-suprnova
Mining with ethOS on Suprnova.
So ethOS is basically shipped per default to mine on pools such as ethermine, nanopool and others that use wallet addresses as the account and that do NOT require workers.
Classic pools like Suprnova and Coinmine do require workers, this is where you need special steps to be able to mine on it with ethOS.
First of all, you will need to add a worker on Suprnova for EACH ethOS rigs you have.
The worker MUST be your rig's hostname. To find out, simply login in SSH and you'll see a similar line:
08:26 PM root@bd3655 [71.5 hash] /root #
In this case here, our worker will be bd3655.
maciekish /
Created Aug 10, 2016
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/*
open /Applications/
henriquemenezes /
Last active Sep 14, 2021
Android: Generate Release/Debug Keystores

Android: Generate Release/Debug Keystores

Generate Keystores

Debug Keystore

$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"
destan /
Last active Sep 14, 2021
Parse RSA public and private key pair from string in Java
import java.nio.file.Files;
import java.nio.file.Paths;
dpmedeiros /
Last active Jan 28, 2021
Mock main thread handler for use in Android unit tests (requires Mockito and PowerMock)
package com.dpmedeiros.androidtestsupportlibrary;
import android.os.Handler;
import android.os.Looper;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.powermock.api.mockito.PowerMockito;
import java.util.concurrent.Executors;
lopspower /
Last active Sep 20, 2021
Hexadecimal color code for transparency

Hexadecimal color code for transparency


How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

wenzhixin / ubuntu14.04-command-line-install-android-sdk
Last active Mar 23, 2021
Ubuntu 14.04 command line install android sdk
View ubuntu14.04-command-line-install-android-sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
jensgro / enterprise-link.html
Last active Feb 10, 2019
Enterprise-Code from hell
View enterprise-link.html