Skip to content

Instantly share code, notes, and snippets.

View MacsInSpace's full-sized avatar

Craig Hair MacsInSpace

  • Department of Education
  • Melbourne
  • 16:11 (UTC +10:00)
View GitHub Profile
@niw
niw / mkmobileconfig.sh
Created November 10, 2019 08:25
Create a blank configuration profile.
#!/usr/bin/env bash
set -e
readonly PLIST_BUDDY=/usr/libexec/PlistBuddy
while getopts "i:h" opts; do
case $opts in
i)
IDENTIFIER=$OPTARG
@brenorb
brenorb / tweet_dumper.py
Last active March 11, 2023 18:17 — forked from yanofsky/LICENSE
A Python 3.+ script to download all of a user's tweets into a csv.
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
@PandaWhoCodes
PandaWhoCodes / get_all_followers.py
Last active May 3, 2022 05:48
best way get all twitter followers of a user using tweepy
import time
import tweepy
import csv
auth = tweepy.OAuthHandler("", "")
auth.set_access_token("",
"")
def get_followers(user_name):
@whiskerz007
whiskerz007 / gist:53c6aa5d624154bacbbc54880e1e3b2a
Last active May 7, 2025 13:39
How to setup a community version of Proxmox VE 5.x-6.x
# Disable Commercial Repo
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list
apt-get update
# Add PVE Community Repo
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list
apt-get update
# Remove nag
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script
@jgillman
jgillman / 1-Info.md
Created January 3, 2019 23:01
Automated certbot renew for Mac with launchd (launchctl)

Automatic certbot renew on a Mac

It seems like everyone is using cron for setting up certbot renew on Macs but I couldn't find anyone doing it with launchd. The other file in this Gist is the service file.

The documentation on the Let's Encrypt site actually recommends having it run twice a day (12 hours apart) but I've found that once a day is more than sufficient since if it fails it still has another 29 days to succeed.

#!/bin/bash
# Variables - edit to suit your environment
# Path to the ESET Endpoint Antivirus installer package file
pkgpath="/path/to/installer.pkg"
# Path to exported settings file you wish to import
settingsfile="/path/to/eset_settings"
# Set the variable below to "replace" if you are going to apply your own user settings to the ESET GUI (e.g. notifications/alerts)
replaceguicfg="yes"
# Path to the directory containing your custom ESET user GUI configuration
@machv
machv / Bootstrap.ini
Created November 7, 2018 11:13
[MDT] Multi-site deployment
[Settings]
Priority=FallbackDeployRoot, DefaultGateway, Default
[FallbackDeployRoot]
; Default deployment root in case of failure in the next step with the gateway selection
DeployRoot=\\CZ-PRG-MDT\ClientDeploymentShare$
[DefaultGateway]
; Based on the default gateway we will select corresponding location section
172.24.39.254=CZ-PRAHA
def delete(api, date, r):
with open("likes.csv") as file:
count = 0
for row in csv.DictReader(file):
tweet_id = int(row["tweet_id"])
try:
print "Deleting like"
api.CreateFavorite(status_id=tweet_id)
#!/usr/bin/env ruby
require 'twitter'
client = Twitter::REST::Client.new do |config|
config.consumer_key = ""
config.consumer_secret = ""
config.access_token = ""
config.access_token_secret = ""
end
@mdusher
mdusher / safetydance.rb
Last active July 19, 2018 01:29
safetydance.rb
#!/usr/bin/env ruby
require 'twitter'
client = Twitter::REST::Client.new do |config|
config.consumer_key = "YOUR_CONSUMER_KEY"
config.consumer_secret = "YOUR_CONSUMER_SECRET"
config.access_token = "YOUR_ACCESS_TOKEN"
config.access_token_secret = "YOUR_ACCESS_SECRET"
end