Skip to content

Instantly share code, notes, and snippets.

View ruan65's full-sized avatar
🎯
Focusing

Andrew ruan65

🎯
Focusing
View GitHub Profile
@ruan65
ruan65 / curl.md
Created March 30, 2024 19:20 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@ruan65
ruan65 / form_utils.dart
Created October 4, 2021 16:18 — forked from roipeker/form_utils.dart
TextField concept for GetX (WIP) ...
/// copyright 2020, roipeker
class FormValidations {
static String email(String val) {
val = val.trim();
if (val.isEmpty) return 'Email cant be empty';
if (val.length <= 4) return 'Email is too short';
if (!val.isEmail) return 'Invalid email';
return null;
}
@ruan65
ruan65 / TmdbApi.kt
Created September 22, 2018 17:55 — forked from rubenpla-develop/TmdbApi.kt
#Kotlin #Android Retrofit2 singleton instance sample
package rubenpla.develop.privtmdbendlesslist.data.api
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.GET
import retrofit2.http.Query
import rubenpla.develop.privtmdbendlesslist.data.model.MoviesResultsItem
interface TmdbApi {
// Needed in AndroidManifest:
<!-- Permission for using NFC hardware -->
<uses-permission android:name="android.permission.NFC"/>
<!-- Forcing device to have NFC hardware -->
<uses-feature android:name="android.hardware.nfc" android:required="true"/>
<!-- Registering app for receiving NFC's TAG_DISCOVERED intent -->
<intent-filter>
<action android:name="android.nfc.action.TAG_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false"
android:color="@color/flat_disabled_text"/>
<item android:color="@color/flat_normal_text"/>
</selector>