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 | |
# Debug | |
set -o xtrace | |
GUEST_IP=192.168.122.221 | |
HOST_IP=192.168.122.1 | |
# Wipe the current usbfluxd, usbmuxd, and socat: | |
sudo killall usbfluxd |
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 | |
################################################################### | |
#Description : Script for install tools for android reversing | |
# Testing in Ubuntu 20.04 | |
# Run as root | |
# Tools: | |
# - APKtool | |
# - Jadx | |
# - adb |
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
#include "xc.h" | |
#include "config.h" | |
#define _XTAL_FREQ 4000000 | |
unsigned short pot = 0; | |
void interrupt isr() { | |
// Disable GIE (best practice?) |
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
import android.os.Bundle; | |
import android.support.design.widget.AppBarLayout; | |
import android.support.design.widget.TabLayout; | |
import android.support.v4.widget.SwipeRefreshLayout; | |
import android.support.v7.app.AppCompatActivity; | |
import android.support.v7.widget.GridLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.Log; | |
import com.blackcj.designsupportexample.adapters.RecyclerViewAdapter; |
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
package au.com.qantas.qantas.common.presentation; | |
import android.content.Context; | |
import android.support.design.widget.AppBarLayout; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.support.v4.widget.SwipeRefreshLayout; | |
public class AppbarSwipeRefreshLayout extends SwipeRefreshLayout implements | |
AppBarLayout.OnOffsetChangedListener { |
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
// All values/comments are valid with ATmega8 running at Fosc = 4.000MHz | |
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
// TIMER0 with prescaler clkI/O/1024 | |
#define TIMER0_PRESCALER (1 << CS02) | (1 << CS00) | |
void main() |
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
/* | |
* Converts Decimals to Fractions | |
* | |
*/ | |
package simpleai; | |
/** | |
* | |
* @author sarabeth | |
*/ |
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
// Adapted from: http://bateru.com/news/2011/11/improved-code-for-javascript-decimal-to-fraction/ | |
function gcd(a, b) { | |
return (b) ? gcd(b, a % b) : a; | |
} | |
var decimalToFraction = function (_decimal) { | |
var top = _decimal.toString().replace(/\d+[.]/, ''); | |
var bottom = Math.pow(10, top.length); | |
if (_decimal > 1) { |
This is a gist used in the following blog posts:
NewerOlder