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
// Progranism Source Code: Version 2.5.1 | |
// This new version of Progranisms should handle restrictive environments better | |
// It implements a better method of seeding the random number generator | |
// Returning to asexual behavior | |
// 2.5.1: Modified mutation selection code | |
// This is Linux code and should not compile under Windows | |
#include <sys/time.h> | |
#include <stdio.h> |
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
var Base64 = function(){}; | |
Base64._rixits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_"; | |
Base64.toHash = function( n ) { | |
if( isNaN(Number(n)) || n===null || n===Number.POSITIVE_INFINITY || n<0 ) throw "The input is not valid"; | |
n = Math.floor( n ); | |
var result = ''; | |
do result = this._rixits.charAt(n%64) + result; | |
while( n=Math.floor(n/64) ); | |
return result; // String |
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
/* | |
* By default JS returns invalid modulo values for negative numbers, | |
* below line fixes this, by overriding default js mod function | |
*/ | |
Number.prototype.mod=function(n){return((this%n)+n)%n;} |
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
$ cat Dockerfile | |
FROM alpine:3.12 | |
RUN { uname -a; uname -m; printf '\n\n'; cat /proc/cpuinfo; } > /root/me.txt | |
ENTRYPOINT [ "cat", "/root/me.txt" ] | |
$ TAG='meedamian/docker-ci:v12.7.2020' | |
$ docker manifest inspect alpine:3.12 | jq -r '.manifests[].platform | .os + "/" + .architecture + " " + .variant' | |
linux/amd64 | |
linux/arm v6 |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"regexp" | |
"strings" | |
"github.com/BurntSushi/toml" |
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
BEGIN MESSAGE. | |
Sw1PBSKPuyTysVy gZXX1djGS17VP8k rHn7IxbTeJXZ9bt GZue2SmxtdUA7ej | |
A5Ddm1b72VkW7xr vM7rUfUuR6jTCKq 6Xr2MZHgg6oNuC9 nkEQRsGdOelo3e7 | |
wRco5AgmmO2bs9K UT6hXr1eTb0Ecgt Wi53jycGZpxTg1q GKipgamPtWo1hYQ | |
8Qmq35ePuyF3qa3 tZsuYtm6PdCmtJK hmCHg29HFxl. | |
END MESSAGE. |
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
'use strict'; | |
const RESET_AFTER_HOURS = 6; | |
const HOUR = 36e5; // 60 * 60 * 1000; | |
class Tabs { | |
constructor() { | |
this.restore() | |
} |
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 it to config file: | |
$google_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; | |
// add this to libs file: | |
function shorten($url) { | |
$gurl = "https://www.googleapis.com/urlshortener/v1/url?key=" . $GLOBALS['google_key']; | |
$url = json_encode(array("longUrl" => $url)); | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
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 | |
LAST_DATE="$1" | |
last="$(bitcoin-cli getblockcount)" | |
get_last() { | |
while true; do | |
DATE="$(date -d "@$(bitcoin-cli getblock "$(bitcoin-cli getblockhash "$last")" | jq '.time')" +"%Y-%m-%d")" |
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
package main | |
import ( | |
"context" | |
"encoding/hex" | |
"fmt" | |
"io/ioutil" | |
"time" | |
"github.com/lncm/lnd-rpc/v0.9.0/lnrpc" |
NewerOlder