Skip to content

Instantly share code, notes, and snippets.

View juliuscanute's full-sized avatar
💭
I may be slow to respond.

juliuscanute

💭
I may be slow to respond.
View GitHub Profile
@juliuscanute
juliuscanute / README.md
Last active December 10, 2020 09:33
[PTRACE] #ptrace #calling #process #find #process #id #regex

Ptrace

A system call responsible for a process attaching itself to another process: ptrace.

List all syscalls in mac os x

sudo dtrace -ln 'syscall:::entry'

How PTRACE was called?

@juliuscanute
juliuscanute / README.md
Last active September 21, 2020 22:45
[Data Collection for Sequence Classification] #data #collection #sequence #classification #machine #learning

Building a dataset

  • Google Dataset Search
  • Kaggle

Define activities to record using Motion API

enum ActivityType: Int {
    case none, driveIt, shakeIt, chopIt
}
@juliuscanute
juliuscanute / Configuration.swift
Created May 30, 2020 09:44
No UI Configuration Swift
static func initConfig() {
multiConfig = startMultiConfig(apply: {
$0.multiConfig(configuration: configuration())
})
@juliuscanute
juliuscanute / SampleApp.kt
Created May 30, 2020 09:39
No UI Sample App
class SampleApp : Application() {
override fun onCreate() {
super.onCreate()
startMultiConfig {
multiConfig(
configuration = configuration()
)
}
}
}
@juliuscanute
juliuscanute / build.gradle
Created May 30, 2020 09:36
No UI Dependency
implementation('com.juliuscanute.multiconfignoui:multiconfignoui:1.0.59@aar') {
transitive = true
}
@juliuscanute
juliuscanute / MainActivity.kt
Last active May 31, 2020 02:56
Android MultiConfigure Get
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val config = MultiConfigure.getConfig()
val colorConfig = config.getConfigPair("D")
setContent {
MaterialTheme {
Greeting(
text = config.getConfigString("C"),
visibility = config.getConfigBoolean("A"),
final class ConfigurationData: ObservableObject {
/*...*/
func setData(environment: String? = nil) {
/*...*/
let config: ConfigurationGetter = Environment.multiConfig!.getConfig()
let text = config.getConfigString(userKey: "C")
let visibility = config.getConfigBoolean(userKey: "A")
let size = Int(config.getConfigInt(userKey: "B"))
let currentChoice: KotlinPair = config.getConfigPair(userKey: "D")
let choiceNo: Int = Int(currentChoice.second as! Int32)
@juliuscanute
juliuscanute / Environment.swift
Created May 30, 2020 05:24
Start MultiConfig iOS
public enum Environment {
/*...*/
static func initConfig() {
multiConfig = startMultiConfig(rootGroup: "group.julius.multiconfig",
controller: getLaunchController(), apply: {
$0.multiConfig(configuration: configuration())
})
}
/*...*/
}
@juliuscanute
juliuscanute / StartAndroid.kt
Created May 30, 2020 05:15
Start MultiConfig Android
class SampleApp : Application() {
override fun onCreate() {
super.onCreate()
startMultiConfig(
context = this,
intent = Intent(this@SampleApp, MainActivity::class.java)
) {
multiConfig(configuration = configuration())
}
}
@juliuscanute
juliuscanute / AndroidConfigureSmall.kt
Created May 30, 2020 05:01
Android Configure Small
appConfig {
config("FREE") {/*...*/}
config("PREMIUM") {/*...*/}
}