ncftpput -R -v -u "username" ftp.nixcraft.biz /nixcraft/forum /tmp/phpbb
Where,
This file contains hidden or 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
| class DetailViewModel( | |
| private val handle: SavedStateHandle | |
| ) : ViewModel() { | |
| fun loadData() { | |
| val id = handle["id"] ?: "default" | |
| // Load data for ID... | |
| } | |
| } |
This file contains hidden or 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
| dependencies { | |
| def version = "2.2.0" | |
| implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$version" | |
| implementation "androidx.lifecycle:lifecycle-livedata-ktx:$version" | |
| implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$version" | |
| // or lifeycle-compiler if not using Java 8 | |
| //kapt "androidx.lifecycle:lifecycle-compiler:$version" | |
| implementation "androidx.activity:activity-ktx:1.1.0" | |
| implementation "androidx.fragment:fragment-ktx:1.2.1" | |
| } |
This file contains hidden or 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 | |
| # | |
| # Bootstrap script for setting up a new OSX machine | |
| # | |
| # This should be idempotent so it can be run multiple times. | |
| # | |
| # Notes: | |
| # | |
| # - If installing full Xcode, it's better to install that first from the app | |
| # store before running the bootstrap script. Otherwise, Homebrew can't access |
This file contains hidden or 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 ChatService extends Service { | |
| public class LocalBinder extends Binder { | |
| public MessagingService getService() { | |
| return ChatService.this.mMessagingService; | |
| } | |
| } | |
| private final IBinder mBinder = new LocalBinder(); | |
| @Inject MessagingService mMessagingService; |
Delete tracked files in directory:
git ls-files -z | xargs -0 rm -rf
Delete a file from history of a branch:
git filter-branch --index-filter "git rm --cached -f --ignore-unmatch <path/filename>"
See log with files changed:
git log --name-status
Delete remote branch:
This file contains hidden or 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
| #pragma once | |
| #include <android/log.h> | |
| #define LOG_VERBOSE 1 | |
| #define LOG_DEBUG 2 | |
| #define LOG_INFO 3 | |
| #define LOG_WARN 4 | |
| #define LOG_ERROR 5 |
This file contains hidden or 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
| LOCAL_PATH := $(call my-dir) | |
| # hatch library | |
| include $(CLEAR_VARS) | |
| LOCAL_MODULE := prebuilt-static-lib | |
| LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libprebuilt-static-lib.a | |
| # The header files should be located in the following dir relative to jni/ dir | |
| LOCAL_EXPORT_C_INCLUDES := include/ | |
| include $(PREBUILT_STATIC_LIBRARY) |
This file contains hidden or 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
| static jclass callbacksClass; | |
| static jobject callbacksInstance; | |
| JNIEXPORT void JNICALL Java_com_example_NativeClass_nativeMethod(JNIEnv* env, jclass callingObject, jobject callbacks) | |
| { | |
| // Cache the Java callbacks instance | |
| callbacksInstance = env->NewGlobalRef(callbacks); | |
| // Cache the Java callbacks class (in case of interface, this will be the concrete implementation class) | |
| jclass objClass = env->GetObjectClass(callbacks); |
This file contains hidden or 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
| #Lighttpd configured as a https proxy server | |
| server.modules = ( | |
| "mod_access", | |
| "mod_alias", | |
| "mod_compress", | |
| "mod_redirect", | |
| #"mod_rewrite", | |
| "mod_proxy", | |
| ) |