Skip to content

Instantly share code, notes, and snippets.

View genesem's full-sized avatar
🏠
Working from home

Gene Semerenko genesem

🏠
Working from home
View GitHub Profile
aasb = Unknown
action = Unknown
ad = Unknown
addh = Unknown
adsafe = Unknown
adtest = Ads test mode (when adtest=on, Google treats the query as a test so ad impressions aren’t counted)
adtest-useragent = Unknown
aec = Unknown
aep = Unknown
affdom = Unknown
aasb = Unknown
action = Unknown
ad = Unknown
addh = Unknown
adsafe = Unknown
adtest = Ads test mode (when adtest=on, Google treats the query as a test so ad impressions aren’t counted)
adtest-useragent = Unknown
aec = Unknown
aep = Unknown
affdom = Unknown
# Reset
RESET='\033[0m' # Text Reset
# Special Colors
C='\033[0;2m' # Default color setting
CB='\033[0;1m' # Default color setting and bright a little bit
# Regular Colors
BLACK='\033[0;30m' # Black
RED='\033[0;31m' # Red
@genesem
genesem / firebase-messaging-sw.js
Created November 23, 2021 14:34 — forked from loicginoux/firebase-messaging-sw.js
Adding FCM to an html page to receive notifications and sending then via FCM ruby gem. (edit: HTTPS needed!)
// [START initialize_firebase_in_sw]
// Give the service worker access to Firebase Messaging.
// Note that you can only use Firebase Messaging here, other Firebase libraries
// are not available in the service worker.
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-messaging.js');
// Initialize the Firebase app in the service worker by passing in the
// messagingSenderId.
firebase.initializeApp({
@genesem
genesem / _html_entities.scss
Created September 13, 2019 14:06 — forked from apisandipas/_html_entities.scss
HTML Entities map - The pseudo-element 'content' property doesnt accept normal (») style HTML entities. These variables below easy the pain of looking up the HEX codes...
/**
* The pseudo-element 'content' property doesnt accept normal (») style
* HTML entities. These variables below easy the pain of looking up the HEX codes...
*
* Referenced from http://www.danshort.com/HTMLentities/
*
* TODO: Add all the other entities? Worth it? Some day? Maybe?
*/
// Punctuation
@genesem
genesem / nginx.conf
Created September 2, 2019 09:22 — forked from kmjones1979/nginx.conf
Example NGINX configuration to route based on country code using GeoIP
# load dynamic modules
load_module /etc/nginx/modules/ngx_http_geoip_module.so;
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events { worker_connections 1024; }
http {
@genesem
genesem / Nginx redirect to named location
Created August 30, 2019 08:04 — forked from inso/Nginx redirect to named location
NGINX: Redirect from current location into named location
# Solution 1
# Use only codes greater than 418, do not use common status codes 404, 402, 403, etc
location /location1 {
error_page 463 = @app; return 463;
}
# Solution 2 (drawbacks unknown)
location /location2 {
try_files /dev/null @app;
}
@genesem
genesem / Nginx redirect to named location
Created August 30, 2019 08:04 — forked from inso/Nginx redirect to named location
NGINX: Redirect from current location into named location
# Solution 1
# Use only codes greater than 418, do not use common status codes 404, 402, 403, etc
location /location1 {
error_page 463 = @app; return 463;
}
# Solution 2 (drawbacks unknown)
location /location2 {
try_files /dev/null @app;
}
@genesem
genesem / vpn.md
Created August 16, 2019 08:34 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

A Russian translation of this article can be found here, contributed by Timur Demin. There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.

Why not?