Skip to content

Instantly share code, notes, and snippets.

View jaykepeters's full-sized avatar
🏠
Working from home

Jayke Peters jaykepeters

🏠
Working from home
View GitHub Profile
@camckin10
camckin10 / warmup1.py
Last active January 8, 2019 17:06
WarmUp Exercises from CodingBat Python(Python3)
#EXERCISE #1
#diff21--Given an int n, return the absolute difference between n and 21, except return double the absolute difference if
#n is over 21.
#first solution try--only got 1 out of 12 correct
def diff21(n):
if n < 21:
return n *2
else:
return n - 21
@pcgeek86
pcgeek86 / install_go_pi.sh
Last active May 31, 2024 16:42 — forked from random-robbie/install_go_pi.sh
Install Go Lang on Raspberry Pi
cd $HOME
FileName='go1.13.4.linux-armv6l.tar.gz'
wget https://dl.google.com/go/$FileName
sudo tar -C /usr/local -xvf $FileName
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF
source ~/.bashrc
@opus-x
opus-x / Spotify_Eliminate_Advertisements
Last active June 23, 2024 16:56
Eliminate Spotify Advertisements + Complete Server List
##################################################################################
# ELIMINATE SPOTIFY ADS (VERSION 1.2 - 8.5) - ABANDONED FOR NOW #
##################################################################################
#
# NOTE: SOMETIMES ONLY ANNOUNCEMENT OF AN AD WHILE USING APP VERSION 7.5-7.9?-8.x.
# USING AN OFFICIAL OLDER VERSION SOLVES THIS. TEST IT (APKMIRROR). THIS WILL NOT
# OCCUR USING CHROMECAST / GOOGLE HOME.
#
# COULD NOT SOLVE THE AUDIO AD INRO/OUTRO IN THE APP.
# SUGGESTIONS? WRITE A COMMENT BELOW.
@igorvoltaic
igorvoltaic / useradd.sh
Last active March 8, 2024 09:36
Create new user using command line in Mac OS X. Do not forget to set correct permissions for the file.
#!/bin/sh
if [[ `id -u` != 0 ]]; then
echo "Must be root to run script"
exit
fi
read -p "Enter user name and press [ENTER]: " UserName
if [[ $UserName == `dscl . -list /Users UniqueID | awk '{print $1}' | grep -w $UserName` ]]; then
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active June 22, 2024 05:17
crack activate Office on mac with license file
@grahampugh
grahampugh / Remove Application.sh
Last active September 28, 2023 13:20
A Jamf Pro script to remove applications in the Applications folder.
#!/bin/bash
#######################################################################
#
# Remove Application Script for Jamf Pro
#
# This script can delete apps that are sandboxed and live in /Applications
#
# The first parameter is used to kill the app. It should be the app name or path
# as required by the pkill command.
@gregneagle
gregneagle / prefs_observer.py
Created August 1, 2017 18:20
Getting notified when a preference changes (using PyObjC)
from Foundation import NSObject, NSUserDefaults, NSKeyValueObservingOptionNew
from Foundation import NSRunLoop, NSDate
class PrefsObserver(NSObject):
def observe(self, domain, key):
self.domain = domain
self.key = key
if self:
self.defaults = NSUserDefaults.alloc().initWithSuiteName_(
@mminer
mminer / MyService.swift
Last active April 23, 2024 23:00
Components of XPC service.
import Foundation
class MyService: NSObject, MyServiceProtocol {
func upperCaseString(_ string: String, withReply reply: @escaping (String) -> Void) {
let response = string.uppercased()
reply(response)
}
}
@immae1
immae1 / .var.www.html.pihole.index.js
Last active February 12, 2021 16:55
This script is to add a random gif into the PIHOLE blockpage
// on page load, search for & display a random gif matching your search term using the Giphy API and add them to the pihole blockpage
// thanks to the nealrs (github)
// immae1 2017
var x = "Pi-hole: A black hole for Internet advertisements."
document.addEventListener('DOMContentLoaded', function () {
items = ["funny cats","dejay","nerd","beer"]; // tag array
var item = items[Math.floor(Math.random()*items.length)];
@mcatta
mcatta / check.sh
Created January 19, 2017 16:22
Bash script to check if usb device is connect via adb
!/bin/bash
#IP='1216.58.205.195'
function pingDevice {
#ping -c1 -t300 $IP 2>/dev/null 1>/dev/null
#if [ "$?" = 0 ]
if adb get-state 1>/dev/null 2>&1
then