Skip to content

Instantly share code, notes, and snippets.

View kernelp4nic's full-sized avatar

Sebastián Moreno kernelp4nic

  • Prisma Campaigns
  • Montevideo-Uruguay
View GitHub Profile
@croxton
croxton / SSL-certs-OSX.md
Last active October 26, 2024 19:20 — forked from leevigraham/Generate ssl certificates with Subject Alt Names on OSX.md
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

@jasongilman
jasongilman / atom_clojure_setup.md
Last active May 11, 2024 02:25
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

(defn code-mirror
"Create a code-mirror editor. The parameters:
value-atom (reagent atom)
when this changes, the editor will update to reflect it.
options
:style (reagent style map)
will be applied to the container element
:js-cm-opts
options passed into the CodeMirror constructor
:on-cm-init (fn [cm] -> nil)
@paulirish
paulirish / what-forces-layout.md
Last active November 15, 2024 16:45
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@lukebrooker
lukebrooker / gmail.css
Last active February 13, 2017 18:49
Custom gmail css when using preview pane
/* Hide to menu bar until hover */
.nH.w-asV.aiw {
-webkit-transform: translateY(-80%);
transition: all .2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
transition-delay: .2s;
z-index: 1000;
background-color: #eee;
}
#!/usr/bin/env bash
# For opening a file from the heads up display of Figwheel in IntelliJ IDEA
# Made for OS X but should work similarly on Linux with a different CMD variable
# Add this script to your path (ex. ~/bin) and use from
# :open-file-command in the :figwheel section of project.clj
INTELLIJ_VERSION=14 # Change for your (whole number) version of IntelliJ IDEA
CMD="/Applications/IntelliJ IDEA ${INTELLIJ_VERSION}.app/Contents/MacOS/idea"
"$CMD" "$PWD" --line $2 "$PWD/$1"
@nvbn
nvbn / core.cljs
Created May 28, 2015 01:31
svg animation
(ns ^:figwheel-always svg-image-example.core
(:require-macros [cljs.core.async.macros :refer [go-loop]])
(:require [cljs.core.async :refer [<! timeout]]
[om.core :as om :include-macros true]
[om-tools.core :refer-macros [defcomponent]]
[om-tools.dom :as dom]))
(enable-console-print!)
(defcomponent rotated-rect-rect
@wienczny
wienczny / update_phabricator.sh
Last active January 11, 2020 22:53
Phabricator Backup, Update and Launch script.
#!/bin/sh
set -e
set -x
# This script should be run as user phabricator
# This is an example script for updating Phabricator, similar to the one used to
# update <https://secure.phabricator.com/>. It might not work perfectly on your
# system, but hopefully it should be easy to adapt. This script is not intended