Skip to content

Instantly share code, notes, and snippets.

@x2q
x2q / curl-h3.sh
Created September 18, 2023 19:49 — forked from sinwoobang/curl-h3.sh
Install curl supporting HTTP/3 on Apple Silicon
# Referred to https://dev.to/gjrdiesel/installing-curl-with-http3-on-macos-2di2
# Clean up any old version of curl you may have already tried to install
brew remove -f curl
# Download the curl ruby install script provided by cloudflare
curl -O https://gist.githubusercontent.com/sinwoobang/bfc7cc8d4d38157bde064fc2ccb60c64/raw/bf55b7c6af9ed06d2cd909ea167a69948a800e7d/curl.rb
# Install curl via that script from the latest git repos
brew install --HEAD -s curl.rb
#!/bin/bash
input="$1"
count=$2
blank=$((count - 1))
output="${1%.pdf}-header.pdf"
pagenum=$(pdftk "$input" dump_data | grep "NumberOfPages" | cut -d":" -f2)
(for i in $(seq "$blank"); do echo; done) | enscript -L1 -B --output - | ps2pdf - > /tmp/pa$$.pdf
(for i in $(seq "$pagenum"); do echo; done) | enscript -a ${count}- -L1 -F Helvetica@10 --header='||Page $% of $=' --output - | ps2pdf - > /tmp/pb$$.pdf
pdfjoin --paper letter --outfile /tmp/join$$.pdf /tmp/pa$$.pdf /tmp/pb$$.pdf &>/dev/null
cat /tmp/join$$.pdf | pdftk "$input" multistamp - output "$output"
#!/bin/bash
#################################
# Speech Script by Dan Fountain #
# [email protected] #
#################################
INPUT=$*
STRINGNUM=0
ary=($INPUT)
echo "---------------------------"
echo "Speech Script by Dan Fountain"
rtmp://flash0.11003-live0.dna.qbrick.com/11003-live4 playpath=livedr01astream3 live=1
rtmp://flash0.11003-live0.dna.qbrick.com/11003-live4 playpath=livedr01astream3 live=1
country region timezone
AD Europe/Andorra
AE Asia/Dubai
AF Asia/Kabul
AG America/Antigua
AI America/Anguilla
AL Europe/Tirane
AM Asia/Yerevan
AN America/Curacao
AO Africa/Luanda
#!/usr/bin/env python
# A simple Python script to convert csv files to sqlite (with type guessing)
#
# @author: Rufus Pollock
# Placed in the Public Domain
import csv
import sqlite3
import unicodedata
def strip_accents(s):
#! /bin/bash
#
# Copyright(c) 2011-2013 Brother Industries, Ltd.
# All Rights Reserved.
#
#Brother retains any and all copyrights to the Software.
#In no case this Agreement shall be construed to assign
#or otherwise transfer from Brother to User any copyrights
#or other intellectual property rights to whole or any part
#of the Software.
#! /bin/bash
NBLOOP=3
COMPRESS_OBJECT=db/
memstats()
{
(
renice 19 $$ >/dev/null 2>&1
while : ; do
ps --no-headers -o rss -C $1 || break
#!/usr/bin/env ruby -w
require 'net/http'
require 'net/https'
require 'openssl'
require 'uri'
DIR = File.dirname(__FILE__)
uri = URI.parse("https://test.directory.securecode.com:443/")