Discover gists
javascript: q = location.href; | |
q = q.replace(/[?&]utm_[^&]*/g, ""); | |
q = q.replace(/[?&]mc_[^&]*/g, ""); | |
q = q.replace(/[?&]src=[^&]*/g, ""); | |
q = q.replace(/[?&]ref=[^&]*/g, ""); | |
desc = ""; | |
if (document.getElementsByName("description").length > 0) { | |
desc = document.getElementsByName("description")[0].getAttribute("content") | |
"\n\n" | |
} else if (document.getElementsByName("Description").length > 0) { |
// ==UserScript== | |
// @name CDR insert links | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-02-12_v3 | |
// @description inject external download links on cdromance | |
// @author iamevn | |
// @match https://cdromance.com/* | |
// @grant GM.xmlHttpRequest | |
// @connect cdromance.org | |
// @updateURL http://gist.github.com/iamevn/3afea03de61fa351bcde666f7c6d13f6/raw/cdromance-download-links.user.js |
- create Docker droplet via digitalocean one-click-app-docker
- log into it
- generate SSH key
ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa
- Copy it
# Serve nextJS app from a port through NGINX reverse proxy (HTTP) | |
# Path: /etc/nginx/sites-available/default | |
# Default server configuration for HTTP | |
server { | |
server_name www.DOMAINNAME.com DOMAINNAME.com; | |
# Serve any static assets with NGINX | |
location /_next/static { | |
alias /home/ubuntu/PROJECT_FOLDER/.next/static; |
$ cat ~/fragment8.txt
• The year is 𝟮𝟬𝟴𝟯.
In a post-Amazon world, brain-computer interfaces are widespread. Although expensive, with the total operating cost approaching 20 years of median United States income (and reducing life expectancy by about as much), they are essential for employment. Most people, even young adults, adapt to the newly acquired sensory and control capabilities only in a rudimentary way. Still, this gives you enough of an advantage over your peers that the last two decades saw a steep decline in workplaces where an unaltered human could succeed; or pass a single performance review.
Every parent looking out for their child's future wants to see them transition to the altered life as early as they can—and, since the CLEAR MINDS Act passed in 2061, that means the age of 24. With the prefrontal cortex fully formed and the brain's plasticity almost gone, even the latest low-power hybrid ASIC driving hundreds of implanted electrodes amounts to little more than an awkward way to keep up wit
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
git_current_branch () { | |
local ref | |
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null) | |
local ret=$? | |
if [[ $ret != 0 ]] | |
then | |
[[ $ret == 128 ]] && return | |
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return | |
fi | |
echo ${ref#refs/heads/} |