- play.csssecrets.io/inner-rounding — sqrt
- play.csssecrets.io/diamond-images — sqrt
- play.csssecrets.io/bevel-corners — sqrt
- play.csssecrets.io/folded-corner — sqrt
- play.csssecrets.io/folded-corner-realistic — sqrt, sin, cos
sqrt(2) == cos(45deg) * 2
Code Shadow | |
https://www.youtube.com/c/CodeShadow | |
DevDojo | |
https://www.youtube.com/channel/UCjF0OccBT05WxsJb2zNkL4g/playlists | |
Tutorial Python - Abel Separovich | |
https://www.youtube.com/user/Oseparovich/playlists |
import { Entity, Column, PrimaryGeneratedColumn, getRepository, CreateDateColumn, UpdateDateColumn } from 'typeorm' | |
import { Type, Field, ID, String, Mutation } from 'graphql-typescript' | |
class CreateUserArguments { | |
@Field(String) username: string | |
@Field(String) password: string | |
} | |
@Entity({ name: 'User' }) | |
@Type |
#!/usr/bin/env bash | |
declare -a regions=( | |
us-east-2 #US East (Ohio) | |
us-east-1 #US East (N. Virginia) | |
us-west-1 #US West (N. California) | |
us-west-2 #US West (Oregon) | |
ap-northeast-1 #Asia Pacific (Tokyo) | |
ap-northeast-2 #Asia Pacific (Seoul) | |
ap-south-1 #Asia Pacific (Mumbai) |
sqrt(2) == cos(45deg) * 2
#Basic equasion, I do it this way to increase reliablity because I trust JavaScript's date parsing more than writing a regex against nightbot. | |
$(eval Math.trunc((Date.now()- Date.parse('$(twitch mellana "{{uptimeAt}}")'))/(1000*60*60));) | |
#Version 1, repeats the math multiple times | |
@mellana You've been live for just over $(eval Math.trunc((Date.now()- Date.parse('$(twitch mellana "{{uptimeAt}}")'))/(1000*60*60));) hours. By this point in your broadcast you should have consumed at least $(eval 4*Math.trunc((Date.now()- Date.parse('$(twitch mellana "{{uptimeAt}}")'))/(1000*60*60));)oz ($(eval 120*Math.trunc((Date.now()- Date.parse('$(twitch mellana "{{uptimeAt}}")'))/(1000*60*60));)mL) of water to maintain optimum hydration. | |
#Version 2, builds string in Javascript, but only does math once! | |
$(eval const hours = Math.trunc((Date.now()- Date.parse('$(twitch mellana "{{uptimeAt}}")'))/(1000*60*60)); "@mellana You've been live for just over " + hours + " hours. By this point in your broadcast you should have consum |
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands) | |
gpg --gen-key | |
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` | |
# check current keys: | |
gpg --list-secret-keys --keyid-format LONG | |
# See your gpg public key: | |
gpg --armor --export YOUR_KEY_ID | |
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333) |
Last updated: 2021-02-21, tested with socket.io v3.1.1
This is the simplest implementation you will find for a client/server WebSockets architecture using socket.io.
To see a full explanation, read my answer on SO here: https://stackoverflow.com/a/24232050/778272.
If you're looking for examples using frameworks, check these links:
# Install ffmpeg | |
brew install ffmpeg | |
# Download | |
ffmpeg -i https://foo.com/bar.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4 |