Skip to content

Instantly share code, notes, and snippets.

View sajjadintel's full-sized avatar

Sajad Abbasi sajjadintel

View GitHub Profile
@knowbody
knowbody / RNfontWeights.js
Created July 14, 2016 13:42
React Native Font Weight Cheatsheet iOS
{ fontWeight: '100' }, // Thin
{ fontWeight: '200' }, // Ultra Light
{ fontWeight: '300' }, // Light
{ fontWeight: '400' }, // Regular
{ fontWeight: '500' }, // Medium
{ fontWeight: '600' }, // Semibold
{ fontWeight: '700' }, // Bold
{ fontWeight: '800' }, // Heavy
{ fontWeight: '900' }, // Black
@sab99r
sab99r / fcm.php
Last active May 4, 2021 19:08
PHP Function to Send FCM Message to Android
<?php
/*
Parameter Example
$data = array('post_id'=>'12345','post_title'=>'A Blog post');
$target = 'single tocken id or topic name';
or
$target = array('token1','token2','...'); // up to 1000 in one request
*/
public function sendMessage($data,$target){
//FCM api URL
@ppflrs
ppflrs / Convert "application octet-stream; charset=binary" to ASCII Raw
Last active September 9, 2024 07:01
Convert "application/octet-stream; charset=binary" to ASCII
cat $BIN_FILE | tr -d '\0' > $NEW_FILE
@rtgibbons
rtgibbons / oc
Last active February 3, 2022 23:03
Openconnect init script
#! /bin/bash
### BEGIN INIT INFO
# Provides: openconnect
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Basic script to connect to a SSL VPN using Openconnect
### END INIT INFO
@subfuzion
subfuzion / curl.md
Last active July 8, 2026 20:07
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.

public class NumberTextWatcher implements TextWatcher {
//usage
//editText.addTextChangedListener(new NumberTextWatcher(editText));
private DecimalFormat df;
private DecimalFormat dfnd;
private boolean hasFractionalPart;
@rachelss
rachelss / set_NatGeo_img_as_desktop.sh
Last active December 17, 2022 10:51 — forked from bergeycm/set_NatGeo_img_as_desktop.sh
Sets National Geographic's Image of the Day as Desktop background for Mac OSX
#!/bin/bash
cd ~/Pictures/NatGeo
rm NG_img_of_day
rm NG_img_of_day_site
curl http://photography.nationalgeographic.com/photography/photo-of-the-day/ \
-o NG_img_of_day
@kosiara
kosiara / proguard-rules.pro
Created November 3, 2015 15:39
RxJava RxAndroid Proguard rules
#build.gradle
#
# compile 'io.reactivex:rxandroid:1.0.1'
# compile 'io.reactivex:rxjava:1.0.14'
# compile 'io.reactivex:rxjava-math:1.0.0'
# compile 'com.jakewharton.rxbinding:rxbinding:0.2.0'
# rxjava
-keep class rx.schedulers.Schedulers {
public static <methods>;
@protrolium
protrolium / ffmpeg.md
Last active May 25, 2026 14:10
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@PaulSec
PaulSec / Burp certificate on Android
Created February 16, 2015 19:40
Add your Burp certificate on an Android device
To do so:
1. Export your Burp Certificate
Proxy > Options > CA Certificate > Export in DER format
2. Convert it to PEM
openssl x509 -inform der -in cacert.der -out burp.pem
3. Download it on the device