You'll find the talks here
Approaching frontend as a backend developer, Svelte feels surprisingly pythonic. Let's take a quick look at what's familiar, what's foreign, and how to explore the gap.
| // when T is any|unknown, Y is returned, otherwise N | |
| type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N; | |
| // when T is never, Y is returned, otherwise N | |
| type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N; | |
| // when T is a tuple, Y is returned, otherwise N | |
| // valid tuples = [string], [string, boolean], | |
| // invalid tuples = [], string[], (string | number)[] |
| /** | |
| * Encryption class for encrypt/decrypt that works between programming languages. | |
| * | |
| * @author Vee Winch. | |
| * @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference. | |
| * @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here. | |
| */ | |
| class Encryption { |
| # An example to get the remaining rate limit using the Github GraphQL API. | |
| import requests | |
| headers = {"Authorization": "Bearer YOUR API KEY"} | |
| def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section. | |
| request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers) | |
| if request.status_code == 200: |
| """Blackjack, by Al Sweigart [email protected] | |
| The classic card game also known as 21. (This version doesn't have | |
| splitting or insurance.) | |
| More info at: https://en.wikipedia.org/wiki/Blackjack | |
| This code is available at https://nostarch.com/big-book-small-python-programming | |
| Tags: large, game, card game | |
| [Youtube video] @ (https://www.youtube.com/watch?v=tu0lnL0EbGE) | |
| """ |
| mkdir -p ~/.local/share/fonts | |
| for type in Bold Light Medium Regular Retina; do wget -O ~/.local/share/fonts/FiraCode-$type.ttf "https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-$type.ttf?raw=true"; done | |
| fc-cache -f |
| <?php | |
| namespace App; | |
| use Carbon\Carbon; | |
| use Hash; | |
| use Illuminate\Auth\Notifications\ResetPassword; | |
| use Illuminate\Contracts\Auth\MustVerifyEmail; | |
| use Illuminate\Database\Eloquent\SoftDeletes; | |
| use Illuminate\Foundation\Auth\User as Authenticatable; |
| # Apache configuration file | |
| # httpd.apache.org/docs/2.2/mod/quickreference.html | |
| # Note .htaccess files are an overhead, this logic should be in your Apache | |
| # config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html | |
| # Techniques in here adapted from all over, including: | |
| # Kroc Camen: camendesign.com/.htaccess | |
| # perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ | |
| # Sample .htaccess file of CMS MODx: modxcms.com |
You'll find the talks here
Approaching frontend as a backend developer, Svelte feels surprisingly pythonic. Let's take a quick look at what's familiar, what's foreign, and how to explore the gap.
When it comes to API development, my weapon of choice for testing my code is Postman. I start using Postman since it's still a Chrome App. Now it encourages its user to use Postman Native app. I definitely love the idea, but all I can find is a download link without any installation document for Linux Mint.
So, here's what I did:
Download postman
$ wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
Extract archive
$ sudo tar -xzf postman.tar.gz -C /opt
In VSCode, I'm using the Attach by Process ID config, so I can select the node process running Express, and voila!
Debugging session even survives edits and Live Reload.
View screencast on YouTube: https://youtu.be/pf9A9nBOnRc
Pick the node process that is running the ./server/index.js file