RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
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/
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 ruby | |
| # Author : Ky-Anh Huynh | |
| # License : MIT | |
| # Date : 2020-05-02 | |
| # Usage : | |
| # | |
| # $ gem install watir headless | |
| # $ pacman -s xvfb | |
| # $ PASSWORD="your_router_password" ./restart.rb |
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
| @echo off | |
| cmdkey.exe /list > "%TEMP%\List.txt" | |
| findstr.exe Target "%TEMP%\List.txt" > "%TEMP%\tokensonly.txt" | |
| FOR /F "tokens=1,2 delims= " %%G IN (%TEMP%\tokensonly.txt) DO cmdkey.exe /delete:%%H | |
| del "%TEMP%\List.txt" /s /f /q | |
| del "%TEMP%\tokensonly.txt" /s /f /q | |
| echo All done | |
| pause |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
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
| Beginner: Linked List, Stack, Queue, Binary Search Tree. | |
| Intermediate: Heap, Priority Queue, Huffman Tree, Union Find, Tries, Hash Table, Tree Map. | |
| Proficient: Segment Tree, Binary Indexed Tree, Suffix Array, Sparse Table, Lowest Common Ancestor, Range Tree. | |
| Expert: Suffix Automaton, Suffix Tree, Heavy-Light Decomposition, Treap, Aho-Corasick, K-d tree, Link-Cut Tree, Splay Tree, Palindromic Tree, Rope, Dancing Links, Radix Tree, Dynamic Suffix Array. |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Google Fonts Preview</title> | |
| <style> | |
| #preview { | |
| margin: 0 auto; | |
| text-align: center; | |
| width: 80%; | |
| } |
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
| /* Since script loading is dynamic, we take | |
| a callback function with our loadScript call | |
| that executes once the script is done downloading/parsing | |
| on the page. | |
| */ | |
| var loadScript = function(src, callbackfn) { | |
| var newScript = document.createElement("script"); | |
| newScript.type = "text/javascript"; | |
| newScript.setAttribute("async", "true"); | |
| newScript.setAttribute("src", src); |
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
| # | |
| # Nginx host conf | |
| # | |
| # Allows Laravel 4 and SimpleSamlphp to exist together peacefully | |
| # | |
| # Laravel 4 - | |
| # https://github.com/laravel/laravel | |
| # SimpleSamlphp - | |
| # https://github.com/simplesamlphp/simplesamlphp | |
| # |
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
| /* (320x480) iPhone (Original, 3G, 3GS) */ | |
| @media only screen and (min-device-width: 320px) and (max-device-width: 480px) { | |
| /* insert styles here */ | |
| } | |
| /* (320x480) Smartphone, Portrait */ | |
| @media only screen and (device-width: 320px) and (orientation: portrait) { | |
| /* insert styles here */ | |
| } | |
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
| # Homebrew | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew install git | |
| # Zsh (can skip) | |
| brew install zsh | |
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
| brew install nginx |