Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
4RwPdnGala2QfMua

Jimmy Rousseau lifeofcoding

💭
4RwPdnGala2QfMua
  • Gainesville, FL
View GitHub Profile
@lifeofcoding
lifeofcoding / change-brightness.sh
Created Jul 2, 2020
Change brightness via command line
View change-brightness.sh
#!/bin/bash
# ./change-brghtness.sh 60
newVal=$(printf "%3.2f\n" $(echo "scale=2; $1 / 100" | bc))
sudo ./display-first-instance.sh | xargs -I{} xrandr --output {} --brightness "$newVal"
View opacify.sh
#!/bin/bash
opacity=$1
sudo sh -c 'xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY $(printf 0x%x $((0xffffffff * '$opacity' / 100)))'
@lifeofcoding
lifeofcoding / make-app-transparent.txt
Created Jun 19, 2020
Make App Window Transparent in Ubuntu 18.04, 18.10
View make-app-transparent.txt
sh -c 'xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY $(printf 0x%x $((0xffffffff * 80 / 100)))'
Your mouse cursor will become cross-shaped, simply click on any window and it become 80% opacity.
https://tipsonubuntu.com/2018/11/12/make-app-window-transparent-ubuntu-18-04-18-10/
@lifeofcoding
lifeofcoding / cox-free-wifi.js
Created Jun 16, 2020
Cow Wifi Free Trial Bypass
View cox-free-wifi.js
const puppeteer = require("puppeteer");
const sh = require("shelljs");
const random_name = require("node-random-name");
const random_useragent = require("random-useragent");
const fs = require("fs");
const path = require("path");
const randomMac = require("random-mac");
const notifier = require("node-notifier");
const argv = require("yargs")
.option("iface", {
@lifeofcoding
lifeofcoding / Macchangerizer.sh
Last active Oct 11, 2021
Unlimited Cox Wifi Free Trial Script
View Macchangerizer.sh
#!/bin/bash
# Macchangerizer.sh script by Manuel Berrueta tweaked by LifeOfCoding
# Use to automate persistence of mac address spoofing
# prior to connecting to WiFi Access Point
# We will stop the network manager service and bring down wlan0,
# so that after the mac address is modified the change can be persistent effect.
# Then we will use macchanger to spoof the mac address of wlan0
# We finish by starting the network manager service and bringing wlan0 back up.
View anbox-launch.sh
#!/bin/bash
URI=`adb shell pm list packages | grep $1`
ACTIVITY=`adb shell cmd package resolve-activity --brief ${URI#package:} | tail -n 1`
anbox launch --package=${URI#package:} --component=${ACTIVITY//$'/'/}
View cpulimit
#!/bin/sh
#
# Script to start CPU limit daemon
#
set -e
case "$1" in
start)
if [ $(ps -eo pid,args | gawk '$3=="/usr/bin/cpulimit_daemon.sh" {print $1}' | wc -l) -eq 0 ]; then
nohup /usr/bin/cpulimit_daemon.sh >/dev/null 2>&1 &
View fix_sudo
#!/bin/bash
sudo deluser $USER sudo
echo "$USER ALL=NOPASSWD:ALL" | sudo su -c 'cat >> /etc/sudoers'
View electron-eventbus.js
const EventEmitter = require('events')
const electron = require('electron')
export default class EventBus extends EventEmitter {
constructor(name='default') {
super()
this._name = name
this._baseEventKey = `EventBus-${name}:`
}
View change-brightness.cmd
#xrandr -q | grep " connected" to find dispplays
xrandr --output VGA-1 --brightness 1.1
xrandr --output HDMI-1 --brightness 1.1