Skip to content

Instantly share code, notes, and snippets.

View frigginglorious's full-sized avatar

Daniel Kraft frigginglorious

View GitHub Profile
@frigginglorious
frigginglorious / AndroidReqHackMitmProxy
Last active March 14, 2023 20:00
AndroidReqHackMitmProxy
AndroidReqHackMitmProxy
Note: without a rooted phone, YMMV
Steps -
brew install mitmproxy
set wifi proxy
(install certs)
npm install -g apk-mitm
brew install scrcpy
@frigginglorious
frigginglorious / high_Fiving.py
Created January 25, 2022 20:57
Card10 High Five Counter
#high five counter for Card10 CCC badge.
import bhi160
import display
import utime
import buttons
import leds
import vibra
import color
@frigginglorious
frigginglorious / gist:4772bcc3d685ca9e7b798d1d35ca5b3c
Created October 20, 2017 16:38
timer script. Accepts one argument, time in seconds before alarm goes off.
#!/bin/bash
seconds=$1; date1=$((`date +%s` + $seconds));
while [ "$date1" -ge `date +%s` ]; do
echo -ne "$(date -u --date @$(($date1 - `date +%s` )) +%H:%M:%S)\r";
done
aplay /usr/share/sounds/alsa/Front_Center.wav
@frigginglorious
frigginglorious / phpSinglPageTableInsert
Created September 13, 2017 02:00
Single page table insert / display in PHP with PDO connection to MySQL
<?php
$host = // BRADS INFO AS A STRING IN QUOTES PROBABLY "localhost"
$db = // BRADS INFO AS A STRING IN QUOTES
$user = // BRADS INFO AS A STRING IN QUOTES
$pass = // BRADS INFO AS A STRING IN QUOTES
$charset = 'utf8';
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
$opt = [

Keybase proof

I hereby claim:

  • I am frigginglorious on github.
  • I am frigginglorious (https://keybase.io/frigginglorious) on keybase.
  • I have a public key ASBycPM3qIWcUE5sLsqZ4y0mk6dnXCkKl30Cyt09ZbVSvAo

To claim this, I am signing this object:

@frigginglorious
frigginglorious / explanation.txt
Created February 7, 2017 22:11
F**k your code: Merge Conflict Resolution.
Here is regex that you can use in your IDE (Atom or Sublime Text) to find and/or replace merge conflict text.
This overwrites all code that conflicts with your changes.
*KNOWN BUG*: If the code between the "=======" and the ">>>>>>" has blank lines in it, this won't work.
(<<<<<<< HEAD\n)|(=======\n)((.+\n)+)(>>>>>>)+.*\n
View an example at http://regexr.com/3f86m
@frigginglorious
frigginglorious / XboxControllerChuckDelayPedal.ck
Created May 13, 2016 02:10
ChucK program: Takes audio input, and adds delay effect when button is pushed on a gamepad, outputs audio
// http://chuck.cs.princeton.edu/
0 => int device;
// feedforward
adc => Gain g => dac;
@frigginglorious
frigginglorious / index.html
Last active February 29, 2016 14:42 — forked from whackashoe/gist:ffa7aea78467ecc73abc
radial-2 neighborhood 1d ca
<html>
<head></head>
<body>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r74/three.min.js"></script>
<script>
var ca = (function(rule, grid_size) {
var radius = 5;
var ruleset = _.map(_.range(1 << radius), function(i) { return (rule >> i) & 1; });
@frigginglorious
frigginglorious / index.html
Last active February 26, 2016 21:31
It is a poker chip
<img style="border-radius:200px 200px 200px 200px;
border:18px dashed;
background-color:red;
width:177px;height:177px;">