This repo contains code for standard and interactive snippets that we share on the about:home page in Firefox pre version 56.
Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/
#!/usr/bin/env bash | |
for i in $(cat packages.txt); do wget --recursive --user "" --password "$TOKEN" https://npm.fontawesome.com/$i; done | |
cat npm.fontawesome.com/@fortawesome/* | grep -o "https://.*.tgz" > tarballs.txt | |
for i in $(cat tarballs.txt); do wget -nc --user "" --password "$TOKEN" $i; done |
chflags -R nouchg . | |
readarray -t files <<< $(find . -type f) | |
for i in "${files[@]}"; do echo $i; mv "$i" "$(sed 's/ ([^()]*)$//g' <<< "$(sed 's/ ([^()]*)[.]/./g' <<< "$i")")"; done |
wget --recursive -e robots=off -nc --load-cookies $COOKIES --span-hosts --domains=reason.com,s3.amazonaws.com -I /digitaledition.reason.com/,/issue/,/archives/ https://reason.com/archives/ | |
for i in s3.amazonaws.com/digitaledition.reason.com/*.pdf\?*; | |
do | |
if ! [ -L "$i" ] | |
then | |
mv $i "${i%%\?*}" | |
ln -s "$(basename ${i%%\?*})" $i | |
readlink $i | |
fi | |
done |
This repo contains code for standard and interactive snippets that we share on the about:home page in Firefox pre version 56.
Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/
for I in $(seq 0 124); do wget -nc "https://www.cia.gov/readingroom/collection/presidents-daily-brief-1961-1969?page=$I"; done | |
for I in $(seq 0 126); do wget -nc "https://www.cia.gov/readingroom/collection/presidents-daily-brief-1969-1977?page=$I"; done | |
cat presidents-daily-brief-* | grep -o "https://www.cia.gov/readingroom/docs/.*.pdf\"" | sed 's/.$//' > list.txt | |
wget -nc -i list.txt |
#[allow(non_snake_case)] | |
mod Q { | |
use std::mem; | |
pub fn rsqrt(number: f32) -> f32 { | |
let x2 = number * 0.5; | |
let mut y = number; | |
let threehalfs = 1.5; | |
let mut i: i32 = unsafe { mem::transmute(y) }; |
let a: number[] = []; | |
let b: (number | string)[] = a; | |
a[0] = 1; | |
b[1] = "lol"; | |
console.log(a); | |
// $ tsc --strict index.ts | |
// $ node index.js | |
// [ 1, 'lol' ] |
#!/usr/bin/env bash | |
for dir in $(dirname $0)/* | |
do | |
if test -d $dir && test -d $dir/.git | |
then | |
echo Updating $(basename $dir). | |
git -C $dir pull | |
fi | |
done |
The createVector method can return vectors of many arities, and therefore different types, in theory.
These types cannot be inferred at compile time from the array of parameters the method is passed.
So, when createVector delegates all but one of the dimensions it was given to another subvector, that subvector is given the compile-time type of Vectorish<Element>
.
Swift types are covariant by default, meaning in the following inheritance diagram: