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 python3 | |
# IRC User List | |
# Written by Tom Hudson for the Raspberry Pi User Guide | |
# Updated 2017-01-03 for Python 3.* | |
# http://tomhudson.co.uk/ | |
import sys, socket, time | |
RPL_NAMREPLY = '353' | |
RPL_ENDOFNAMES = '366' |
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 http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(1337, '0.0.0.0'); | |
console.log('Server running at http://0.0.0.0:1337/'); |
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
https://twitter.com/intigriti/status/1399317852788830211 | |
[][`flat`][`constructor`]`alert(document.domain)``` | |
`${e}` => [object HTMLProgressElement] | |
`${[]/[]}` => NaN | |
`${[][[]]}` => undefined | |
flat | |
constructor |
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/bash | |
dir=$1 | |
if [ ! -d "$dir" ]; then | |
echo "no dir" | |
exit | |
fi | |
find "$dir" -type f -name "*.pdf" | sort | while read file; do | |
evince -s "$file" |
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
javascript:d=document;b=d.createElement`textarea`;c=d.getSelection();b.textContent=[...d.querySelectorAll`div.r>a:first-child`].map(n=>n.href).join`\n`;d.body.appendChild(b);c.removeAllRanges();b.select();d.execCommand`copy`;d.body.removeChild(b) |
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 ( | |
"log" | |
"fmt" | |
"encoding/json" | |
) | |
func main() { | |
b := []byte(`{"name": "tom", "favNum": 6, "interests": ["knives", "computers"], "usernames": {"github": "TomNomNom", "twitter": "@TomNomNom"}}`) |
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
plain | |
|
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
// The ArrayList of slaves is not serializable, so fetching them should be marked as @NonCPS so that | |
// no attempt is made to serialize and save the local state of the function. See here for details: | |
// https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#serializing-local-variables | |
@NonCPS | |
def getSlaves() { | |
def slaves = [] | |
hudson.model.Hudson.instance.slaves.each { | |
slaves << it.name | |
} | |
return slaves |
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
<?php | |
// OK, so here's the hex from the instructions... | |
$lines =<<<LINES | |
7b 0a 20 a0 22 65 76 e5 | |
6e 74 22 ba 20 22 70 e1 | |
73 73 77 ef 72 64 5f e3 | |
68 61 6e e7 65 22 2c 8a | |
20 20 22 f5 73 65 72 ee | |
61 6d 65 a2 3a 20 22 e2 | |
63 6f 6c ec 69 6e 22 ac |
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" | |
"log" | |
"strings" | |
) | |
// Ops | |
const ( |