Create and enter a working directory
mkdir -p ~/dnscrypt-working-directory && cd ~/dnscrypt-working-directory
Become root
sudo -s
javascript:(function () { | |
const now = Date.now().toFixed(2); | |
/* Append timestamp to all linked stylesheet urls */ | |
for (const link of document.querySelectorAll('link[rel~="stylesheet"][href]')) { | |
const url = new URL(link.href); | |
url.searchParams.set('_cssrefresh', now); | |
link.href = url.href; | |
} |
/** | |
* Sadly neither Chrome or Firefox fully support the functionality herein. | |
* Chrome supports only registerProtocolHandler, and Firefox supports | |
* a limited set of content handlers - at the moment it's pretty much | |
* just RSS feeds. These do work great in the older Opera 12 though. | |
* | |
* I've moved on from the abandoned Opera to Firefox but I put these | |
* here for future reference, hopefully browsers implement both | |
* navigator.registerProtocolHandler and navigator.registerContentHandler | |
* fully in the near future. |
Create and enter a working directory
mkdir -p ~/dnscrypt-working-directory && cd ~/dnscrypt-working-directory
Become root
sudo -s
I hereby claim:
To claim this, I am signing this object:
This is a PHP (5.3+) microframework based on anonymous functions.
$priority
#!/usr/bin/env php | |
<?php | |
# From: http://www.reddit.com/r/dailyprogrammer/comments/1ml669/091713_challenge_138_easy_repulsionforce/ | |
function calculate_repulsion_force($mass1, $mass2, $distance) { | |
$divisor = bcmul($mass1, $mass2); | |
$dividend = bcpow($distance, 2); | |
return bcdiv($divisor, $dividend); | |
} |
<?php | |
/** | |
* Ranking Library | |
* contains alogrithms for story ranking | |
* Basically a PHP Implementation of reddits algorithms | |
* | |
* @author Lucas Nolte <lnolte@i.biz> | |
* @since 0.1 | |
* @package Polska Wiadomosc | |
* @subpackage Libraries |
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/5834741/raw/grablinks.js?x="+(Math.random());})(); |
// ActiveTable - a bookmarklet to make tables sortable and editable | |
function init() { | |
var aHrows = getHrows(); | |
var numHrows = aHrows.length; | |
var aHidden = getHiddenColumns(); | |
ATpopup = document.createElement("div"); | |
ATpopup.style.cssText = "position: absolute; visibility: hidden; padding: 0; font-family: Arial; background-color: rgba(255, 255, 255, 0.9); border-radius: .5em; text-align: center; box-shadow: .05em .05em .5em #00C;"; | |
ATpopup.innerHTML = "<a href='sort' title='sort' onclick='sortColumn(); return false'><img border=0 src='http://stevesouders.com/images/sort_up_down.png' style='padding-top: 0.2em;'></a><br><a href='hide' style='color: #C00; font-family: monospace; font-size: 1.5em; text-decoration: none;' title='hide' onclick='hideColumn(); return false'>x</a>"; // TODO - use protocol-less URL for img |
This is a local copy of the commands from: