Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#requirements:
#sha1sum (part of coreutils)
#xxd (part of vim)
#https://github.com/socram8888/ulread
#https://github.com/socram8888/amiitool
#put ulread, ulwrite and amiitool in the same directory as this script
if [ $# -ne 2 ]
'''Routines for manipulating the Dock'''
import os
import subprocess
from Foundation import NSURL
from Foundation import CFPreferencesAppSynchronize
from Foundation import CFPreferencesCopyAppValue
from Foundation import CFPreferencesSetAppValue
@ummjackson
ummjackson / Peach v1 API Endpoints.md
Last active February 8, 2024 18:27
Peach v1 API Endpoints

Peach (peach.cool) API Endpoints

Peach is hot right now so I poked around their API using https://mitmproxy.org/

As of the last update, this seems to be a fairly extensive/complete list of v1 endpoints, but feel free to submit revisions to this gist with any others you find!

Login

@lavalamp
lavalamp / The Three Go Landmines.markdown
Last active February 16, 2024 12:16
Golang landmines

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@nojvek
nojvek / Tinder Auto-liker
Last active November 12, 2021 18:28
Tinder Auto-liker script
<?php
// Licence: WTFPL ! http://www.wtfpl.net/about/
$fbAuth = array("facebook_id" => "123456789", "facebook_token" => "<Use charles proxy to do man-in-middle SSL sniffing and extract fb token>");
// Do the magic.
$tinderToken = tinderCall("auth", "token", $fbAuth); // Authenticate
$authToken = "X-Auth-Token: $tinderToken\r\nAuthorization: Token token=\"$tinderToken\"\r\n";
@callumacrae
callumacrae / build-tools.md
Last active October 25, 2023 15:14
Build tools written in JavaScript
@victorquinn
victorquinn / promise_while_loop.js
Last active March 30, 2023 04:29
Promise "loop" using the Bluebird library
var Promise = require('bluebird');
var promiseWhile = function(condition, action) {
var resolver = Promise.defer();
var loop = function() {
if (!condition()) return resolver.resolve();
return Promise.cast(action())
.then(loop)
.catch(resolver.reject);
@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.