Skip to content

Instantly share code, notes, and snippets.

View mamapitufo's full-sized avatar

Alberto Brealey-Guzman mamapitufo

View GitHub Profile
@cvan
cvan / debug-tailwind.md
Created February 16, 2023 04:55
debug tailwind

show me all the Tailwind CSS classes to use in my project

which CSS selectors to use? this shows all the (non-dynamic) options generated from your project's tailwind.config.js.

rogden/tailwind-config-viewer is the best. run from the command line:

npx tailwind-config-viewer -o 
@borkdude
borkdude / klein.clj
Last active September 23, 2021 12:39
#!/usr/bin/env bb
;; Ported from https://gist.github.com/pyr/d5e17af9c572b681a57de52895437298 to babashka
;; klein aims to be a small joker script to mimick
;; most of leiningen's default behavior while minimizing
;; divergence from standard facilities provided by
;; tools.deps
;; This is built as a single file script to simplify
;; deployment and will avoid requiring any code beyond
@Anachron
Anachron / everything.txt
Created August 24, 2018 16:27
LUKS configs
==> 10-crypt.conf <==
install_items+="/etc/crypttab"
==> crypttab <==
# crypttab: mappings for encrypted partitions
#
# Each mapped device will be created in /dev/mapper, so your /etc/fstab
# should use the /dev/mapper/<name> paths for encrypted devices.
#
# NOTE: Do not list your root (/) partition here.
@amalloy
amalloy / .gitattributes
Created April 10, 2017 16:56
Clojure-aware git-diff hunk headers
*.clj diff=clojure
*.cljs diff=clojure
*.cljx diff=clojure
@Brainiarc7
Brainiarc7 / skylake-tuning-linux.md
Last active May 24, 2024 09:26
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

@mfikes
mfikes / scljs.md
Last active December 29, 2015 10:47
State of ClojureScript

If you look at the 2014 State of ClojureScript survey, these are the top items for What has been most frustrating for you in your use of CLJS?, and my take on work done in these areas is below. It is nothing short of amazing, IMHO.

Therefore I urge you to do the current survey.

  1. Difficulty using ClojureScript REPL: The Node.js REPL was added, as well as a Nashorn REPL, as well as a lot of new "ease-of-use" stuff baked into all base REPLs (doc, pst, etc.). Additionally, a few new ClojureScript REPLs (Ambly, Replete, Planck) rely heavily on new stuff in ClojureScript.
  2. Difficulty debugging generated JavaScript: Source map capability was essentially extended to all REPLs with stack traces automatically being mapped. The
@jlongster
jlongster / immutable-libraries.md
Last active May 6, 2024 12:37
List of immutable libraries

A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.

There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.

Libraries are sorted by github popularity.

Persistent Data Structures w/structural sharing

@magnetikonline
magnetikonline / README.md
Last active May 27, 2024 21:25
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
@ocanbascil
ocanbascil / clojure-markov.clj
Created August 25, 2015 20:38
Clojure Dojo London, August 25 2015, Simple Markov Chain
(require '[clojure.string :as str])
(def test-tweets [
"Saturday night is all right for sonnets."
"530 years ago today, Richard III tried to trade his kingdom for a horse. Turned out stock in his kingdom had dropped below mule.'"
"I never stay in London during August. Tis plague season."
"Nay, Falstaff doth not overeat. That is not where the calories come from."
"If you ask Polonius a question, you deserve the answer you get."
"Tragedy, for me, is when the best actress in a generation has his voice change."
"Fancy costumes, not much plot, cheesy moral tacked on at the end: superhero movies are just court masques."
@pljones
pljones / Game.scala
Created April 21, 2015 21:36
West London Hack Night WLHN April 2015 Text Adventure
package adventure
import scala.collection.mutable.{ Map => MMap }
trait Direction
case object North extends Direction
case object South extends Direction
case object East extends Direction
case object West extends Direction
case object Wrong extends Direction