Skip to content

Instantly share code, notes, and snippets.

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

Abdul Zalil azfx

💭
I may be slow to respond.
View GitHub Profile
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
import android.support.annotation.NonNull;
import android.util.Log;
import static android.content.ContentValues.TAG;
@azfx
azfx / Auto Check-In to Southwest Flights.user.js
Created February 17, 2020 17:01 — forked from stormchasing/Auto Check-In to Southwest Flights.user.js
Auto Check-In to Southwest Flights.user.js
// ==UserScript==
// @name Auto Check-In to Southwest Flights
// @namespace http://www.ryanizzo.com/southwest-auto-check-in/
// @version 1.8
// @author Nicholas Buroojy (http://userscripts.org/users/83813)
// @contributor Ryan Izzo (http://www.ryanizzo.com)
// @contributor JR Hehnly (http://www.okstorms.com @stormchasing)
// @contributor Trevor McClellan (github.com/trevormcclellan)
// @description Automatically check in to Southwest Airline flights at the appropriate time.
// @include https://www.southwest.com/air/check-in/index.html*
@azfx
azfx / flash-android-rom-with-heimdall-on-mac.md
Created January 2, 2019 13:56 — forked from kevinpapst/flash-android-rom-with-heimdall-on-mac.md
Flash a new Android ROM on Mac with ADB and Heimdall

Installing an Android ROM with your Mac via Heimdall and bash

Because every time I want to flash a new ROM, I forgot how I did it the last time.

This is how I re-flashed my unbranded Samsung Galaxy S4 (german black edition) with a stock ROM (because Cyanogenmod crashed my phone all the time). The correct Stock ROM for my Galaxy S4 is: I9505XXUHOJ2_I9505OXAHOJ2_I9505XXUHOJ2

Software you need

  • adb
  • heimdall (brew cask install heimdall-suite)
@azfx
azfx / AdbCommands
Created December 28, 2018 23:44 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@azfx
azfx / twrp_backup.sh
Created December 27, 2018 23:19 — forked from PHLAK/twrp_backup.sh
TWRP Backup Script
#!/usr/bin/env bash
adb reboot recovery
adb wait-for-device
adb shell twrp backup SDBO
adb reboot
https://bountify.co/un-ordered-list-to-json-and-vice-versa
@azfx
azfx / a_mongodb_to_s3_backup.sh
Created February 14, 2016 19:29 — forked from lazarofl/a_mongodb_to_s3_backup.sh
MongoDB Automatic Backup to Amazon S3 with Crontab and s3cmd. Red Hat Linux on Amazon EC2
#!/bin/bash
#Force file syncronization and lock writes
mongo admin --eval "printjson(db.fsyncLock())"
MONGODUMP_PATH="/usr/bin/mongodump"
MONGO_HOST="prod.example.com"
MONGO_PORT="27017"
MONGO_DATABASE="dbname"
@azfx
azfx / _Stay_standalone.md
Created December 28, 2015 20:26 — forked from irae/_Stay_standalone.md
Stay Standalone: Prevent links in standalone web apps opening Mobile Safari

#Stay Standalone

A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.

@azfx
azfx / widget.js
Created November 23, 2015 16:13 — forked from lukencode/widget.js
Starter template for creating jsonp embeddable widgets.
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
var allScripts = document.getElementsByTagName('script');
@azfx
azfx / meteor-nginx
Created October 15, 2015 12:16 — forked from dweldon/meteor-nginx
This is an example of how to configure nginx to serve a meteor app.
server {
listen 80;
server_name app.example.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443;
server_name app.example.com;