This file contains 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
# This is a simple script for install youtube-dl and creating a script in /etc/cron.daily | |
# to automatically update youtube-dl on a daily basis. | |
# can be executed with: | |
# sudo su -c "bash <(wget -qO- https://gist.githubusercontent.com/jonath92/0f6bf4606bc8a34be1bb0826c99b73d1/raw/914aabe6c4b15dc614f18c8816f5ad2828755c22/install-Update-Youtube-dl.sh)" root | |
# Remove apt version to prevent conflicts | |
apt purge -y youtube-dl | |
# Fix python not found error https://askubuntu.com/a/1149489/1013434 | |
ln -s /usr/bin/python3 /usr/local/bin/python |
This file contains 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
import * as React from 'react'; | |
import styled from 'styled-components'; | |
const FullPageLayout = styled<any>(styled.div``)` | |
display: flex; | |
flex-direction: column; | |
`; | |
interface HeaderProps { | |
fixed?: boolean; |
This file contains 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
(() => { | |
// in this example we invoke a fn for a period of 10 sec, invoking it 10 times a second, but we can perceive that the original function is only invoked at most once per second according to the parameter below | |
var TOTAL_TIME_TO_RUN = 10000; // 10 sec | |
var THROTTLE_INTERVAL = 2000; // <= adjust this number to see throttling in action | |
var INVOCATION_INTERVAL = 100; // 0.1 sec | |
// regular fn | |
var punchClock = function punchClock () { |