This file contains 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
#!/usr/bin/env bash | |
sudo apt-get update && sudo apt-get install -y bc bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-dev lib32z1-dev android-sdk | |
if `hash adb &>/dev/null`; then | |
echo "Android tools found..." | |
else | |
echo "Installing android tools..." | |
echo "y" | android update sdk -u -a --filter tools | |
echo "y" | android update sdk -u -a --filter platform-tools |
This file contains 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
source programmer.cfg | |
transport select swd | |
set WORKAREASIZE 0 | |
set CHIPNAME nrf51822 | |
source [find target/nrf51.cfg] | |
reset_config srst_only srst_nogate | |
adapter_nsrst_delay 100 | |
adapter_nsrst_assert_width 100 |
This file contains 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
interface bcm2835gpio | |
# hexdump -s4 -n4 -e '\"0x\" 4/1 \"%02X\"\"\\n\"\" \"' /proc/device-tree/soc/ranges | |
bcm2835gpio_peripheral_base 0x20000000 | |
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET | |
# These depend on system clock, calibrated for stock 700MHz | |
# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET | |
bcm2835gpio_speed_coeffs 146203 36 |
This file contains 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
DIR=`dirname $0` | |
gcc -g \ | |
`pkg-config --cflags --libs gtk+-3.0` \ | |
-I$DIR \ | |
-lMPSSE \ | |
-lftd2xx \ | |
-L$DIR \ | |
-o spixio \ | |
spixio-gtk.c spixio-gui.c spixio.c |
This file contains 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
FROM debian:jessie | |
RUN apt-get update | |
RUN apt-get -y upgrade | |
RUN apt-get install -y python git-core gnupg flex bison gperf libesd0-dev build-essential zip curl libncurses5-dev zlib1g-dev libncurses5-dev gcc-multilib g++-multilib parted kpartx debootstrap pixz qemu-user-static abootimg cgpt vboot-kernel-utils vboot-utils bc lzma lzop automake autoconf m4 dosfstools rsync u-boot-tools schedtool git e2fsprogs device-tree-compiler ccache dos2unix debootstrap | |
RUN git clone --depth 1 https://github.com/offensive-security/kali-nethunter.git /nethunter | |
WORKDIR /nethunter/nethunter-fs/ | |
RUN ./build.sh -f |
This file contains 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
The Python 2.7 documentation recommends the use of cProfile to profile Python code with reasonnably low overhead: https://docs.python.org/release/2.7/library/profile.html | |
If you use virtualenv, dont forget to activate it: | |
$ . bin/activate | |
How do you launch your script with cProfile enabled ? | |
$ python -m cProfile -o run.profile myscript.py | |
The output file (run.profile) will be generated when the execution terminates (including CTRL-C). |
This file contains 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
$el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function callback () { | |
// Executed after CSS transition | |
}); |
This file contains 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
# Simple 16 step drum machine experiment with Node and CoffeeScript | |
# by Peter Cooper - @peterc | |
# | |
# Inspired by Giles Bowkett's screencast at | |
# http://gilesbowkett.blogspot.com/2012/02/making-music-with-javascript-is-easy.html | |
# | |
# Screencast demo of this code at http://www.youtube.com/watch?v=qWKkEaKL6DQ | |
# | |
# Required: | |
# node, npm and coffee-script installed |
NewerOlder