sudo apt-get install tilix
sudo ln -s /etc/profile.d/vte-2.91.sh /etc/profile.d/vte.sh
sudo chmod +x /etc/profile.d/vte.sh
To install chruby and ruby-install: | |
brew install chruby ruby-install | |
To install Ruby using ruby-install: | |
ruby-install ruby 2.7.1 | |
NOTE: You can find latest stable version of Ruby here: https://www.ruby-lang.org/en/downloads/ | |
If you have issues installing Ruby then try the following: | |
brew install openssl@3 | |
ruby-install 3.2.2 -- --with-openssl-dir=$(brew --prefix openssl@3) |
// app/routes/api/auth/$.ts | |
import NextAuth from "~/lib/next-auth/index.server"; | |
export const { action, loader } = NextAuth({ | |
providers: [ | |
GoogleProvider({ | |
clientId: env.GOOGLE_CLIENT_ID, | |
clientSecret: env.GOOGLE_CLIENT_SECRET, | |
}), | |
], |
# Fast reading from the raspberry camera with Python, Numpy, and OpenCV | |
# Allows to process grayscale video up to 124 FPS (tested in Raspberry Zero Wifi with V2.1 camera) | |
# | |
# Made by @CarlosGS in May 2017 | |
# Club de Robotica - Universidad Autonoma de Madrid | |
# http://crm.ii.uam.es/ | |
# License: Public Domain, attribution appreciated | |
import cv2 | |
import numpy as np |
import puppeteer from 'puppeteer-extra'; | |
import pluginStealth from 'puppeteer-extra-plugin-stealth'; // Use v2.4.5 instead of latest | |
import * as readline from 'readline'; | |
puppeteer.use(pluginStealth()); | |
// Use '-h' arg for headful login. | |
const headless = !process.argv.includes('-h'); | |
// Prompt user for email and password. |
Latest News: http://site.api.espn.com/apis/site/v2/sports/football/college-football/news
Latest Scores: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard
# https://gist.github.com/ygotthilf/baa58da5c3dd1f69fae9#gistcomment-2932501 | |
# 2048 bits | |
openssl genrsa -out private.pem 2048 | |
openssl rsa -in private.pem -pubout -out public.pem | |
# 4096 bits | |
openssl genrsa -out private.pem 4096 | |
openssl rsa -in private.pem -pubout -out public.pem |
defmodule MacroExp do | |
defmacro attr_accessor(atom) do | |
getter = String.to_atom("get_#{atom}") | |
setter = String.to_atom("set_#{atom}") | |
quote do | |
def unquote(getter)(data) do | |
data |> Map.from_struct |> Map.get(unquote(atom)) | |
end | |
def unquote(setter)(data, value) do | |
data |> Map.put(unquote(atom), value) |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
country_codes = [ | |
%{ iso_3166_1: "AF", name: "Afghanistan" }, | |
%{ iso_3166_1: "AX", name: "Aland Islands" }, | |
%{ iso_3166_1: "AL", name: "Albania" }, | |
%{ iso_3166_1: "DZ", name: "Algeria" }, | |
%{ iso_3166_1: "AS", name: "American Samoa" }, | |
%{ iso_3166_1: "AD", name: "Andorra" }, | |
%{ iso_3166_1: "AO", name: "Angola" }, | |
%{ iso_3166_1: "AI", name: "Anguilla" }, | |
%{ iso_3166_1: "AQ", name: "Antarctica" }, |