In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT
Personal Settings > Developer settings > Personal access tokens
| function scrollToLoadMore() { | |
| // keep scrolling if twitter tries to stop loading more. | |
| // scroll up, then down to force infinite load. | |
| window.scrollTo(0, 0); | |
| setTimeout(function() { | |
| window.scrollBy(0, 9999999999); | |
| }, 200); | |
| } | |
| function removeTweet(tweetEl) { |
How to setup an Outline VPN Server on Ubuntu 16.04 Server
This guide will show you how to install Outline Server on an Ubuntu 16.04 Server, use Outline Manager for Windows and connect to your Outline Server on Windows and Anroid.
Outline Manager supports Windows, macOS and Linux.
| #!/bin/sh | |
| #Check the Drive Space Used by Cached Files | |
| du -sh /var/cache/apt/archives | |
| #Clean all the log file | |
| #for logs in `find /var/log -type f`; do > $logs; done | |
| logs=`find /var/log -type f` | |
| for i in $logs |
| // ==UserScript== | |
| // @name Remember to eat your food while watching Netflix | |
| // @namespace https://www.tarikguney.com | |
| // @version 0.1 | |
| // @description Kids watching cartoons on Netflix often forget to eat and chew their food, which drives parents crazy. You need to sit down with them and pause the video and remind them to eat their food. This script will automate that. | |
| // @author Tarik Guney | |
| // @match https://www.netflix.com/watch/* | |
| // @icon https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Netflix_icon.svg/1200px-Netflix_icon.svg.png | |
| // @grant none | |
| // ==/UserScript== |
| <form method="post"> | |
| {% csrf_token %} | |
| {{ form }} | |
| <button type="submit">Save changes</button> | |
| </form> |
| countries = [ | |
| {'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'}, | |
| {'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'}, | |
| {'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"}, | |
| {'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'}, | |
| {'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'}, | |
| {'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'}, | |
| {'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai |
| RUN apt update | |
| RUN apt upgrade -y | |
| RUN apt install -y apt-utils | |
| RUN a2enmod rewrite | |
| RUN apt install -y libmcrypt-dev | |
| RUN docker-php-ext-install mcrypt | |
| RUN apt install -y libicu-dev | |
| RUN docker-php-ext-install -j$(nproc) intl | |
| RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev | |
| RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ |