Skip to content

Instantly share code, notes, and snippets.

View soknifedev's full-sized avatar
🖐️
HUMAN

Ricardo Sánchez soknifedev

🖐️
HUMAN
View GitHub Profile
package X;
import android.content.Context;
import android.graphics.Point;
import android.os.Build;
import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import android.view.WindowManager;
import java.util.Locale;
rvzip() {
rm $1
zip -x "*/\__MACOSX" -x "\.*" -x "*/.DS_Store" -x -x "*/\.*" -r $@
}
rvlist() {
arg_path=$1
arg_type=$2
find $arg_path -type f -not -path "*/\.*" -printf "<file path=\"{$arg_type}/${/}%h${/.\//---}\">%f</file>\n";
#gfind $arg_path -type f -not -path "*/\.*" -printf "\t\t\t\t\t<file path=\"$arg_type%h/\">%f</file>\n" | sed '$
@soknifedev
soknifedev / get_bitly_clicks_by_date.php
Created February 6, 2020 19:57
Gets bitly clicks with posibility of filtering with start and/or end dates.
<?php
header('content-type: application/json');
function error() {
$args = func_get_args();
$response = ['success' => false];
$response['message'] = (String) array_shift($args);
$response['data'] = $args;
die(json_encode($response, JSON_PRETTY_PRINT));
}