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/zsh | |
# Check that the manpage exists | |
man -w $1 &> /dev/null | |
if [[ $? -ne 0 ]]; then | |
echo "No manual entry for $1" >&2 | |
exit 1 | |
fi | |
# base_folder='<base href="~/"\>' |
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
# 1. Define a function, called "double", which doubles the number you give it | |
def double (x): | |
return (2 * x) | |
# 2. Set a variable called "output", make it {equal} to double of 4 | |
y = 4 | |
output = double (y) | |
# 3. Print that variable | |
# print (output) |
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/zsh | |
counter=0 | |
for row in {2..${LINES}}; do | |
((counter+=1)) | |
# print -f '#'%.s {$((1+1))..$(($COLUMNS-1))}% | |
print -f '#'%.s {1..${COLUMNS}} | |
# (save) (left 1) (erase 1) (col 1) (erase 1) (return) | |
print -N '\x1b7' '\x1b[1D' '\x1b[X' '\x1b[1G' '\x1b[1X' '\x1b8' '\n' | |
done |
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
Export[ | |
"output.svg", | |
WolframAlpha[ | |
"integrate 1/(1+cos(x)^2)", | |
{ | |
{ | |
"IndefiniteIntegral", 2 | |
}, | |
"Content" | |
}, |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>ANSIBlackColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS | |
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxARElVO | |
U1JHQlxOU0NvbG9yU3BhY2VWJGNsYXNzTxAoMC4wOTAxOTYwNzg0MyAwLjEwOTgwMzky | |
MTYgMC4xNDkwMTk2MDc4ABABgALSFBUWF1okY2xhc3NuYW1lWCRjbGFzc2VzV05TQ29s |
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
const express = require('express') | |
const path = require('path') | |
const bodyParser = require('body-parser') | |
const app = express() | |
const router = express.Router() | |
const favicon = require('express-favicon') | |
const mongoose = require('mongoose') | |
const encrypt = require('mongoose-encryption') | |
// support parsing jsons |
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
public class Server extends Thread { | |
private Socket clientSocket; | |
private BufferedReader fromClient; | |
private DataOutputStream toClient; | |
Server(Socket socket) { | |
this.clientSocket = socket; | |
} | |
public static void main (String args[]) throws Exception { |
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
<<- EOF > basicquery.txt | |
Today's date is $(date) | |
The user ${USER} is on host ${HOST} | |
This program launched on ${TTY} | |
EOF | |
for domain in ${<(./domain_names.txt)}; { | |
print "Performing DNS query on ${domain}" | |
dig ${domain} | |
} > output.txt |
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 java.time.LocalTime; | |
import java.time.format.DateTimeFormatter; | |
public class Timer { | |
public static void main(String[] args) { | |
/* Get the current time */ | |
LocalTime localTime = LocalTime.now(); |
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
from sys import argv | |
from subprocess import run | |
import datetime | |
import re | |
origin = None | |
index = 0 | |
easy=[ | |
0, | |
1.2, |
OlderNewer