This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
#init-hook= | |
# Add files or directories to the blacklist. They should be base names, not |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import sys | |
import collections | |
def dict_merge(dictionary, merge_dictionary): | |
for key, val in merge_dictionary.iteritems(): | |
if (key in dictionary and isinstance(dictionary[key], dict) | |
and isinstance(merge_dictionary[key], collections.Mapping)): | |
dict_merge(dictionary[key], merge_dictionary[key]) | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo dtrace -lvi "syscall:::" 2>&1 >/dev/null | grep syscall | tr -s " " | cut -d" " -f 4 | uniq > osx_syscall_probes.txt | |
syscall | |
exit | |
fork | |
read | |
write | |
open | |
close | |
wait4 | |
#8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# consume the first argument so we can deal with the key as one variable | |
username=$1 | |
shift | |
sudo useradd $username | |
sudo -u $username mkdir /home/$username/.ssh/ | |
sudo -u $username touch /home/$username/.ssh/authorized_keys | |
sudo chmod 640 /home/$username/.ssh/authorized_keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add user to the sudo users group | |
sudo usermod $1 -G wheel | |
# generate a 16 byte key and print it | |
key=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` | |
echo $key | |
# set the users password to that key and expire it so they have to change it when they login | |
sudo sh -c "echo $key | passwd --stdin $1" | |
sudo passwd -e $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Category Brand+Model Size Price Link | |
Ultrawide Dell U3417W 34" $645 https://www.amazon.com/Dell-FR3PK-34-Inch-Led-Lit-Monitor/dp/B01IOO4TIM/ref=cm_cr_arp_d_product_top?tag=slickdeals&ascsubtag=6c93cbdeeea411e8af96b213d4e1265c0INT&ie=UTF8 | |
Gaming Asus ROG Swift PG279Q 27" $590 newegg refurb https://slickdeals.net/f/11322175-refurbished-asus-rog-pg279q-g-sync-1440p-gaming-monitor-ips-27-amp-quot-589-99-with-free-free-krazilla-power-bank-w-purchase?src=SiteSearchV2_SearchBarV2Algo1 | |
Ultrawide Acer XR342CK bmijqphuzx 34" $551 https://slickdeals.net/f/11282031-acer-xr2-series-xr342ck-34-quot-ips-1ms-mprt-hdmi-widescreen-led-backlight-lcd-led-monitor-551?src=SiteSearchV2_SearchBarV2Algo1&fbclid=IwAR1U-2gLRMrWI5bwuyCbgr1HXURcRYmjfw2KsuBUVhqR-Tic780FDo2fLXg | |
4K BenQ PD3200U 32" $51 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<div id="elem1"> | |
<div id="elem2"> | |
Hi | |
</div> | |
</div> | |
<script> | |
count = 0; | |
ha = function(obj){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tempfile | |
files = [] | |
while True: | |
try: | |
file = tempfile.TemporaryFile() | |
print("Created file:", file, file.name) | |
files.append(file) | |
except OSError: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sets up a standalone proxyDHCP server, to PXE netboot, as a container made | |
# from https://github.com/jpillora/webproc to get a web ui on port 8080 to edit | |
# conf + monitor logs. You could probably swap out the container and the config | |
# and most of this script would still be good. | |
# | |
# The actual container used is https://hub.docker.com/r/jpillora/dnsmasq | |
# There's a screenshot on that page. | |
# | |
# Notes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Outputs JSON paths. | |
# | |
# Based on https://news.ycombinator.com/item?id=20264654 | |
# | |
# Usage: | |
# curl -s https://raw.githubusercontent.com/sitepoint-editors/json-examples/master/src/db.json | ./jsonpaths | |
jq -r --stream ' |
OlderNewer