Skip to content

Instantly share code, notes, and snippets.

View gyaresu's full-sized avatar

Gareth gyaresu

View GitHub Profile
@mpj
mpj / monad-stream-example.js
Last active September 14, 2022 06:42
This is the code from Monads - episode #21 of FunFunFunction (https://www.youtube.com/playlist?list=PL0zVEGEvSaeFSwPn06GKArptSxiP1Gff8)
const fetch = require('node-fetch')
const Bacon = require('baconjs')
function getInPortuguese(word) {
// Google Translate API is a paid (but dirt cheap) service. This is my key
// and will be disabled by the time the video is out. To generate your own,
// go here: https://cloud.google.com/translate/v2/getting_started
const apiKey =
'AIzaSyB4DyRHIsNhogQXmH16YKbZfR-lTXrQpq0'
const url =
FIR: Input Samplerate: 2000000, Output Samplerate: 500000, Signals: 100, Signal len: 29573
set_data: 0.01
set_center_freq: 0.01
dst.reset: 0.00
xlating_filter: 14.09
get_data: 1.58
misc: 0.02
signal_start: 0.93
fft: 1.46
shift_fft: 1.78
@vrunoa
vrunoa / logcat.log
Last active January 24, 2016 20:37
Compass Card fareboot log
Compass card (NXP MIFARE DESFire EV1)
application > 1 0 0
file no > 0
read data > 90 bd 0 0 7 0 0 0 0 0 0 0 0
result > 91 ae
Clipper card(MIFARE DESFire)
application > 90 11 f2
file no > 1
read data > 90 bd 0 0 7 1 0 0 0 0 0 0 0
@achillean
achillean / gifcreator.py
Last active December 15, 2021 21:17
Create GIFs from a Shodan json.gz file using the API
#!/usr/bin/env python
# Dependencies:
# - arrow
# - shodan
# - ImageMagick
#
# Installation:
# sudo easy_install arrow shodan
# sudo apt-get install imagemagick
#
@gbaman
gbaman / HowToOTG.md
Last active May 9, 2025 20:48
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@jboone
jboone / morse_synth.py
Last active June 7, 2022 16:32
Morse code baseband file synthesizer for HackRF.
#!/usr/bin/env python
# Copyright (C) 2015 Jared Boone, ShareBrained Technology
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
@miek
miek / GSG case
Last active January 8, 2025 14:58
Unofficial case for YARD Stick One and Ubertooth One from Great Scott Gadgets - http://greatscottgadgets.com/
@gyaresu
gyaresu / HackRF-FM-Transmit.grc
Last active February 21, 2022 15:04
HackRF FM Transmit with GnuRadio
<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.8'?>
<flow_graph>
<timestamp>Tue Aug 25 19:04:21 2015</timestamp>
<block>
<key>options</key>
<param>
<key>author</key>
<value></value>
</param>
@tkuester
tkuester / DC23_SaaS.md
Last active October 9, 2024 03:50
DEFCON23 / WCTF: Shock Collar as a Service

Vegas is the last place I ever expected to visit. And yet, I wound up tucking myself into the corner of the Wireless Village for three days, absorbing excellent talks on the state of wireless hackery. Though I hadn't planned to try any of the challenges, I got drawn into @dntlookbehindu's (aka Russ) "SDR Roulette".

Shock Collar

Russ purchased a dog collar to analyze the wireless communication between remote

@StevenLangbroek
StevenLangbroek / component-with-decorator.js
Created August 7, 2015 07:16
Difference between mixins and higher-order components (as ES7 decorators).
import React from 'react';
function animateIn(Component){
return class DecoratedComponent extends React.Component {
componentWillEnter(){
// Do some swanky animation
}
render(){
// Inherit all props