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
| <div class="wrap"> | |
| <h1>Style visited links with localStorage</h1> | |
| <h2>Why?</h2> | |
| <p> | |
| Since browsers allow only very basic CSS on <code>:visited</code> I created this way to check a user has clicked a link. If he clicks on any link, that has the class <code>.trackVisit</code> the complete href is saved in an array in localStorage. | |
| On each page visit and click on a link the script adds the class <code>.visited</code> so we can style it however we want. | |
| </p> | |
| <h2>Demo Links: Repo services</h2> | |
| <p> | |
| The links have <code>e.preventDefault();</code> - so you can click them hassle free ;) |
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
| proxy_cache_path /tmp/cacheapi levels=1:2 keys_zone=microcacheapi:100m max_size=1g inactive=1d use_temp_path=off; | |
| server { | |
| listen 443 ssl http2 default_server; | |
| listen [::]:443 ssl http2 default_server; | |
| server_name example.com; | |
| location /api/ { | |
| # Rate Limiting | |
| limit_req zone=reqlimit burst=20; # Max burst of request |
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
| #!/bin/bash | |
| #usage: mysql-drop-all-tables -d database -u dbuser -p dbpass | |
| TEMP_FILE_PATH='./drop_all_tables.sql' | |
| while getopts d:u:p: option | |
| do | |
| case "${option}" | |
| in |
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
| from time import sleep | |
| from selenium import webdriver | |
| from selenium.webdriver.common.action_chains import ActionChains | |
| from selenium.webdriver.common.keys import Keys | |
| from selenium.common.exceptions import TimeoutException | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.support import expected_conditions as EC | |
| from selenium.webdriver.common.by import By | |
| import csv |
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
| <div class="wrap"> | |
| <h1>Style visited links with localStorage</h1> | |
| <h2>Why?</h2> | |
| <p> | |
| Since browsers allow only very basic CSS on <code>:visited</code> I created this way to check a user has clicked a link. If he clicks on any link, that has the class <code>.trackVisit</code> the complete href is saved in an array in localStorage. | |
| On each page visit and click on a link the script adds the class <code>.visited</code> so we can style it however we want. | |
| </p> | |
| <h2>Demo Links: Repo services</h2> | |
| <p> | |
| The links have <code>e.preventDefault();</code> - so you can click them hassle free ;) |
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
| <?php | |
| /** | |
| * CloudFlare 사용시 실제 방문자 IP 및 SSL 사용 여부를 | |
| * 정확하게 파악하지 못하는 문제를 해결하는 클래스 | |
| * 웹서버에 mod_cloudflare를 설치하기 곤란한 경우 사용한다 | |
| * | |
| * Written by 기진곰 <kijin@kijinsung.com> | |
| * License: Public Domain | |
| * |
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
| jQuery(document).ready(function($) { | |
| var imgs = $('img'); //grabbing all the images of a DOM | |
| imgs.addClass('lazy'); //adding .lazy to all the images | |
| imgs.each(function() { | |
| var img_src = $(this).attr('src'); //grabbing the 'src=""' value of each of the img | |
| $(this).attr('data-original', img_src); //assigning the src value to 'data-original' | |
| $(this).removeAttr('src'); //now deleting the 'src' attribute | |
| }); |
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
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
| <title></title> | |
| <meta name="viewport" content="width=device-width"> | |
| <link rel="stylesheet" href="/Content/Design.css"> | |
| <link rel="stylesheet" href="/Content/Print.css" disabled="disabled"> | |
| <link rel="stylesheet" href="/Content/Large.css" disabled="disabled"> | |
| </head> |