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
> rPrint({first={true,1.3,"abc",{1,2,5}},22,33,last={nil,5},2},nil,"Junk") | |
Junk table | |
Junk [1] number 22 | |
Junk [2] number 33 | |
Junk [3] number 2 | |
Junk [last] table | |
Junk [last] [2] number 5 | |
Junk [first] table | |
Junk [first] [1] boolean true | |
Junk [first] [2] number 1.3 |
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
#!/usr/bin/python3 | |
import sys, socket, struct | |
import PIL, PIL.Image, PIL.ImageOps | |
DENSITY_MIN = 0 | |
DENSITY_LIGHT = 1 | |
DENSITY_NORMAL = 2 | |
DENSITY_HEAVY = 3 | |
DENSITY_MAX = 4 |
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
# ----------------------------------------------------------------------------- | |
# Copyright (c) 2016, Nicolas P. Rougier | |
# Distributed under the (new) BSD License. | |
# ----------------------------------------------------------------------------- | |
import sys, math | |
def progress(value, length=40, title = " ", vmin=0.0, vmax=1.0): | |
""" | |
Text progress bar |
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
if (window.navigator.standalone) { | |
var local = document.domain; | |
$('a').click(function() { | |
var a = $(this).attr('href'); | |
if ( a.match('http://' + local) || a.match('http://www.' + local) ){ | |
event.preventDefault(); | |
document.location.href = a; | |
} | |
}); | |
} |
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 SwiftUI | |
// MARK: - Constants | |
// Items in the dock: Add any application you’d like to see in here | |
let items = | |
[ | |
"file:///Applications/Xcode.app", | |
"file:///Applications/Safari.app", | |
"file:///System/Applications/Messages.app", |
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/sh | |
BIN="/usr/local/bin/askpass"; touch $BIN; chmod 755 $BIN | |
security add-generic-password -a $USER -s login -T "" -w | |
echo "#!/bin/sh\\nsecurity find-generic-password -a $USER -s login -w" > $BIN | |
echo "\\n# Set sudo helper.\\nexport SUDO_ASKPASS=$BIN" >> ~/.${SHELL##/*/}rc |
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
// More information: https://danielupshaw.com/openscad-rounded-corners/ | |
module roundedcube_simple(size = [1, 1, 1], center = false, radius = 0.5) { | |
// If single value, convert to [x, y, z] vector | |
size = (size[0] == undef) ? [size, size, size] : size; | |
translate = (center == false) ? | |
[radius, radius, radius] : | |
[ | |
radius - (size[0] / 2), |
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
#!/usr/bin/env python | |
import argparse | |
import sys | |
import jinja2 | |
import markdown | |
TEMPLATE = """<!DOCTYPE html> | |
<html> |
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
// ==UserScript== | |
// @name Twitter - replace X | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description i like birds! | |
// @author hopper.jerry@gmail.com | |
// @match https://twitter.com/home | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com | |
// @grant none | |
// ==/UserScript== |