Skip to content

Instantly share code, notes, and snippets.

View jwasilgeo's full-sized avatar

Jacob Wasilkowski jwasilgeo

View GitHub Profile
Seven different types of CSS attribute selectors
// This attribute exists on the element
[value]
// This attribute has a specific value of cool
[value='cool']
// This attribute value contains the word cool somewhere in it
[value*='cool']
@gavinr
gavinr / user.js
Last active June 27, 2020 02:23
place this in `C:\Users\zzzzzzz\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxx\user.js` -- more info http://kb.mozillazine.org/User.js_file
// Most of these from https://restoreprivacy.com/firefox-privacy/ -
user_pref("media.peerconnection.enabled", false); // block WebRTC
user_pref("privacy.resistFingerprinting", true); // help to make Firefox more resistant to browser fingerprinting
user_pref("privacy.trackingprotection.fingerprinting.enabled", true); // [try to] block fingerprinting
user_pref("privacy.trackingprotection.cryptomining.enabled", true); // block cryptominers
user_pref("privacy.trackingprotection.enabled", true); // enable Mozilla’s built-in tracking protection feature
user_pref("privacy.firstparty.isolate", true); // isolate cookies to the first party domain, which prevents tracking across multiple domains
user_pref("network.cookie.cookieBehavior", 1); // Only accept cookies from the originating site (block third-party cookies)
user_pref("network.cookie.lifetimePolicy", 3); // set cookies to only last after N days [below]
user_pref("network.cookie.lifetime.days", 7);
@mikowl
mikowl / oneliners.js
Last active March 28, 2024 20:52
👑 Awesome one-liners you might find useful while coding.
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// or
const sleep = util.promisify(setTimeout);
@jscarto
jscarto / carrots.py
Last active June 6, 2018 20:56
Carrots Palette
# Perceptually linear color palette based on an image of carrots
carrots = ['#372442','#4e1831','#4f1933','#501933','#511a34','#511b36','#521c37','#531c37','#531d39','#541e3a','#551f3a','#561f3c','#56203d','#57213e','#58223f','#582241','#592341','#5a2342','#5b2444','#5c2545','#5c2546','#5d2647','#5e2749','#5e2849','#5f284a','#60294c','#602a4c','#612b4e','#622b4f','#632c50','#642c50','#662c4f','#692c4f','#6a2c4f','#6e2b4e','#6f2b4e','#712b4d','#732b4d','#742b4d','#772b4c','#7a2a4b','#7c2a4b','#7c2a4b','#7e2a4a','#81294a','#832949','#842949','#872949','#892848','#8a2848','#8d2848','#8f2747','#912747','#932646','#952646','#972545','#982545','#9b2444','#9d2444','#9f2344','#a02343','#a32243','#a42142','#a62142','#a92042','#ab1f41','#ad1e41','#ae1d40','#b01c40','#b21b3f','#b31b3f','#b7193e','#b8183e','#b91a3f','#b91d40','#ba1f41','#bb2042','#bb2244','#bc2344','#bc2646','#bd2747','#bd2948','#be2a49','#bf2b49','#bf2e4b','#c0304c','#c1304b','#c2324b','#c3344a','#c3354a','#c43649','#c53749','#c53948','#c63a48','#c73c47
@tunguskha
tunguskha / Gradient shadow in pure CSS.md
Last active May 4, 2023 06:40
Gradient shadow in pure CSS

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>
@sgillies
sgillies / advanced_rasterio_features.ipynb
Last active April 16, 2024 21:39
Advanced Rasterio features notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gund
gund / index.html
Last active February 12, 2024 00:06
ArcGIS JSAPI setup build with Webpack for production (start reading from webpack.config.js)
<!DOCTYPE html>
<html>
<head>...</head>
<body>
<!-- Load Esri lib -->
<link rel="stylesheet" href="//js.arcgis.com/4.0/esri/css/main.css">
<script src="//js.arcgis.com/4.0/"></script>
<!-- Load our AMD app -->
<script type="text/javascript">
// Wrap our app startup in AMD module
@thollingshead
thollingshead / Dojo_Module.sublime-snippet
Created February 4, 2016 19:11
Sublime snippet for Dojo module boilerplate.
<snippet>
<content><![CDATA[
define([
${1:'dojo/_base/declare'}
], function(
${2:declare}
) {
return declare([$3], {
$4
});