This file contains hidden or 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
| server { | |
| listen 443 ssl http2; | |
| listen [::]:443 ssl http2; | |
| server_name selfagency.net; | |
| # SSL | |
| ssl_certificate /etc/letsencrypt/live/selfagency.net/fullchain.pem; | |
| ssl_certificate_key /etc/letsencrypt/live/selfagency.net/privkey.pem; | |
| ssl_trusted_certificate /etc/letsencrypt/live/selfagency.net/chain.pem; |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| $DOMAIN=selfagency.dev | |
| $EMAIL=hello@selfagency.dev | |
| sudo sed -i -r 's/(listen .*443)/\1;#/g; s/(ssl_(certificate|certificate_key|trusted_certificate) )/#;#\1/g' /etc/nginx/sites-available/$DOMAIN.conf | |
| sudo certbot certonly --webroot -d $DOMAIN --email $EMAIL -w /var/www/_letsencrypt -n --agree-tos --force-renewal | |
| sudo sed -i -r 's/#?;#//g' /etc/nginx/sites-available/$DOMAIN.conf | |
| sudo nginx -t && sudo systemctl reload nginx |
This file contains hidden or 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
| <iframe src="signal.svg" onload="this.before(this.contentDocument.children[0]); this.remove();"></iframe> |
This file contains hidden or 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
| if (require.main === module) { | |
| console.log('called directly'); | |
| } else { | |
| console.log('required as a module'); | |
| } |
This file contains hidden or 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
| <script> | |
| (function(a,b,c){var d=a.history,e=document,f=navigator||{},g=localStorage, | |
| h=encodeURIComponent,i=d.pushState,k=function(){return Math.random().toString(36)}, | |
| l=function(){return g.cid||(g.cid=k()),g.cid},m=function(r){var s=[];for(var t in r) | |
| r.hasOwnProperty(t)&&void 0!==r[t]&&s.push(h(t)+"="+h(r[t]));return s.join("&")}, | |
| n=function(r,s,t,u,v,w,x){var z="https://www.google-analytics.com/collect", | |
| A=m({v:"1",ds:"web",aip:c.anonymizeIp?1:void 0,tid:b,cid:l(),t:r||"pageview", | |
| sd:c.colorDepth&&screen.colorDepth?screen.colorDepth+"-bits":void 0,dr:e.referrer|| | |
| void 0,dt:e.title,dl:e.location.origin+e.location.pathname+e.location.search,ul:c.language? | |
| (f.language||"").toLowerCase():void 0,de:c.characterSet?e.characterSet:void 0, |
This file contains hidden or 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
| // the function that will transform the content or whatever | |
| function myFunction (data, opts) { | |
| // do your stuff here | |
| return `${data}` | |
| } | |
| // the middleware that gets passed to app.use() | |
| function myMiddleware (opts) { | |
| // options passed to the middleware | |
| // eg.: app.use(myMiddleware({opt1: "opt1", opt2: "opt2"}) |
This file contains hidden or 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
| <!-- | |
| oooo .o88o. | |
| `888 888 `" | |
| .oooo.o .ooooo. 888 o888oo .oooo. .oooooooo .ooooo. ooo. .oo. .ooooo. oooo ooo | |
| d88( "8 d88' `88b 888 888 `P )88b 888' `88b d88' `88b `888P"Y88b d88' `"Y8 `88. .8' | |
| `"Y88b. 888ooo888 888 888 .oP"888 888 888 888ooo888 888 888 888 `88..8' | |
| o. )88b 888 .o 888 888 .o. d8( 888 `88bod8P' 888 .o 888 888 888 .o8 `888' | |
| 8""888P' `Y8bod8P' o888o o888o Y8P `Y888""8o `8oooooo. `Y8bod8P' o888o o888o `Y8bod8P' .8' | |
| d" YD .o..P' | |
| "Y88888P' hello@self.agency `Y8P' |
This file contains hidden or 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
| // insert into ~/Library/KeyBindings/DefaultKeyBinding.dict | |
| { | |
| "\UF729" = moveToBeginningOfParagraph:; // home | |
| "\UF72B" = moveToEndOfParagraph:; // end | |
| "$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home | |
| "$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end | |
| "^\UF729" = moveToBeginningOfDocument:; // ctrl-home | |
| "^\UF72B" = moveToEndOfDocument:; // ctrl-end | |
| "^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home |
This file contains hidden or 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
| # Requires doctl and the "public-ip-cli" npm module to be globally installed. | |
| #!/bin/sh | |
| FWID="YOUR_FIREWALL_ID" | |
| IPV4=$("${HOME}/.nodebrew/current/bin/public-ip" --4) | |
| #IPV6=$("${HOME}/.nodebrew/current/bin/public-ip" --6) | |
| printf "🔥 Updating DO firewall rules\n\n" | |
| OLD_RULES="$(doctl compute firewall get "${FWID}" --format InboundRules | tr ' ' '\n' | grep -E 'ports:22|ports:2022' | tr '\n' ' ' | sed '$ s/.$//')" |
This file contains hidden or 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
| * {box-sizing: border-box} | |
| [hidden] {display: none !important} | |
| [disabled] {pointer-events:none; opacity: 0.3} | |
| .horizontal {display: flex; flex-direction: row; justify-content: space-between} | |
| .vertical {display: flex; flex-direction: column} | |
| .center {justify-content: center; align-items: center} | |
| .flex {flex: 1} | |
| html { | |
| --spacing-xs: 8px; | |
| --spacing: 24px; |