Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
rm -rf /Applications/Cleanup\ My\ Mac
rm -rf ~/Library/Application\ Support/mcp
rm -rf ~/Library/LaunchAgents/com.pcv.hlprmcp.plist
killall helpermcp
.progress {
height: 5px;
}
.progress-bar {
background-image: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(0, 0, 0, 1) 100%);
width: 100%;
animation-duration: 3s;
animation-name: sweep;
animation-iteration-count: infinite;
@briehanlombaard
briehanlombaard / s.py
Last active March 15, 2019 21:57
Basic select loop
#!/usr/bin/env python3
import queue
import select
import socket
import threading
import time
Q = queue.Queue()
import argparse
from twisted.internet import reactor, stdio, protocol
from twisted.protocols import basic
class Client(basic.LineReceiver):
delimeter = '\r\n'.encode('ascii')
def connectionMade(self):
#!/usr/bin/env python
import argparse
import numpy as np
from astropy.io import fits
def create(name, w, h, dtype, overwrite=True):
a = np.random.randn(w, h).astype(dtype)
#!/usr/bin/env python
from random import choice
with open('/usr/share/dict/words') as f:
words = f.read().split()
print(''.join(choice(words) for i in range(4)))
import calendar
import ephem
YEAR = 2018
observer = ephem.Observer()
observer.lat = -3222.78
observer.lon = 2048.60
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://my-example.com/create-hello-world",
"type": "Create",
"actor": "https://my-example.com/actor",
"object": {
"id": "https://my-example.com/hello-world",
"type": "Note",
<!DOCTYPE HTML>
<html>
<head>
<title>sol</title>
<script type="text/javascript" src="/static/js/socket.io.slim.js"></script>
<script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
<script type="text/javascript">
window.onload = function() {
var socket = io();
@briehanlombaard
briehanlombaard / download.py
Last active May 20, 2018 09:56
GitHub Gist Language Popularity
#!/usr/bin/env python3
import argparse
import sys
import json
import time
import logging
import threading
import requests