Skip to content

Instantly share code, notes, and snippets.

View exinmusic's full-sized avatar
👂

David Dolan exinmusic

👂
View GitHub Profile
import serial
from pythonosc.udp_client import SimpleUDPClient
from subprocess import call
from time import sleep
import struct
from enum import Enum
print("Turning OFF wlan0.")
call("sudo ifconfig wlan0 down", shell=True) # ensure no wifi
from pythonosc.udp_client import SimpleUDPClient
from subprocess import call
from time import sleep
from pymemcache.client import base
import json
print("Lemme see dat cache...")
print("Turning OFF wlan0.")
call("sudo ifconfig wlan0 down", shell=True) # ensure no wifi
@exinmusic
exinmusic / Component.jsx
Created October 5, 2020 00:42 — forked from krambertech/Component.jsx
ReactJS: Input fire onChange when user stopped typing (or pressed Enter key)
import React, { Component } from 'react';
import TextField from 'components/base/TextField';
const WAIT_INTERVAL = 1000;
const ENTER_KEY = 13;
export default class TextSearch extends Component {
constructor(props) {
super();
#!/usr/bin/env python3
#from datetime import timedelta
#from django.utils import timezone
def times_up(epoch_datetime, timer_delta)
if timezone.now() - epoch_datetime < timer_delta:
return True
else:
return False
Tabby runnining Tomcat on 10.10.10.194
Found LFI
http://10.10.10.194/news.php?file=../../../../etc/magic
/passwd
/
Fuzzed for common tomcat and system credential files
@exinmusic
exinmusic / ENVReact.md
Created May 7, 2020 05:59
Environment variables for React build

These environment variables will be defined for you on process.env. For example, having an environment variable named REACT_APP_NOT_SECRET_CODE will be exposed in your JS as process.env.REACT_APP_NOT_SECRET_CODE.

There is also a built-in environment variable called NODE_ENV. You can read it from process.env.NODE_ENV. When you run npm start, it is always equal to 'development', when you run npm test it is always equal to 'test', and when you run npm run build to make a production bundle, it is always equal to 'production'. You cannot override NODE_ENV manually. This prevents developers from accidentally deploying a slow development build to production.

@exinmusic
exinmusic / main.py
Created January 4, 2020 01:24
micropython led udp test
import time
import machine, neopixel
import math
import utime
import usocket as socket
np = neopixel.NeoPixel(machine.Pin(14), 24)
def sine_wave(amplitude, frequency, phase, offset):
return lambda t: amplitude*math.sin(1*math.pi*frequency*t+phase)+offset
@exinmusic
exinmusic / f-ffmpeg.txt
Last active May 22, 2019 19:57
Fargating FFmpeg
https://gist.github.com/rupakg/e70377a16805c15f73aa4edd1bf964a1
https://lobster1234.github.io/2017/12/03/run-tasks-with-aws-fargate-and-lambda/
1. Build a Dockerfile
FROM jrottenberg/ffmpeg
LABEL maintainer="fin <xn@kys.lel>"
WORKDIR /tmp/workdir
@exinmusic
exinmusic / lambda_custom_deps.txt
Created April 24, 2019 07:22
Python AWS Lambda Cheat Codes
1. Create a directory
2. Install in current directory
`pip install Pillow --target .`
3. static binaries can be placed in a /bin dir
@exinmusic
exinmusic / django_cheats.txt
Last active November 2, 2019 00:04
Django Bootstrapping Notes
1 - Create project folder
(Usually initialize via github with ignores and established remote codebase)
2 - Setup a virtual enviroment in project folder.
virtualenv -p python3 venv (for python3)
3 - Start venv and install dependencies.
pip install Django
4 - Initialize Django project