Skip to content

Instantly share code, notes, and snippets.

View mojavelinux's full-sized avatar

Dan Allen mojavelinux

View GitHub Profile
briandominick / asciidoc-static.adoc
Last active March 11, 2024 18:24
Static Site Generators with AsciiDoc Support

There are 28 static site generators that support AsciiDoc sourcing.

1-In the github repo on Settings > Integration & Services, enable
2-Go to travisCI page and enable the repo
3-Configure the env variables on TravisCI so that it is not necessary to save credentials on github
-in the project Settings on TravisCI, add the entry for netlify site id: NETLIFY_SITE_ID - <site_id from .netlify file generated on netlify create>
-create a netlify access token for TravisCI
-On Netlify Dashboard, Go to Account Settings > OAuth Applications ( > Personal access tokens and press New Access Token
-Name it anything, but to make it easier the suggestion is name TravisCI.
-Generate it and COPY it - you won’t see it again!
-in the project Settings on TravisCI, add the entry for netlify personal access token generated for TravisCI: NETLIFY_ACCESS_TOKEN
4-Generate a .travis.yml file in the local repo
j-po /
Last active August 7, 2022 09:55
`pushd` and `popd`-style commands for git branches (in the place of directories)
# `pushd` and `popd`-style commands for git branches (in the place of directories)
# USAGE: `pushb <branch>; SOME_WORK; popb`
GITSTACK=() # stack of branches–just an array that we add to and access from the tail
GITSTASHCK=() # stack of stashes
function pushb {
GITSTACK+=`git symbolic-ref --short HEAD`
GITSTASHCK+=`git stash create`
git reset --hard # `git stash create` doesn't do this the way `git stash` normally does
git checkout $1
paulirish /
Last active June 19, 2024 15:52
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
jordan-brough / git-recent
Last active April 8, 2024 02:53
Git: Display a list of recently checked out branches/tags/commits
#!/usr/bin/env bash
# Source:
# See also:
# Download this script as "git-recent" (no extension), chmod it to be executable and put it in your
# path somewhere (e.g. /usr/bin). You can then use it via `git recent` from inside any git repo.
# Examples:
ItGumby / build.gradle
Last active October 11, 2017 07:28 — forked from ysb33r/gist:0c534d165863628a07cc
gradle build file for presentations from asciidoctor and deck.js
// You will need the VFS plugin
buildscript {
repositories {
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0'
classpath 'org.ysb33r.gradle:vfs-gradle-plugin:0.5'
classpath 'commons-httpclient:commons-httpclient:3.1'
piscisaureus /
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

paulmillr /
Last active June 21, 2024 13:48
Most active GitHub users (by contributions).

Most active GitHub users (

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

 .filter(user =&gt; user.followers &gt; 1000)
aaronrussell / background_noise_function.rb
Created March 5, 2011 18:24
Sass implementation of the Noisy jquery plugin:
require "rubygems"
require "chunky_png"
require "base64"
module Sass::Script::Functions
def background_noise(c, noise = 0.5, opacity = 0.08, size = 200, mono = false)
# Convert SASS numbers to Ruby classes
noise = noise.to_s.to_f if noise.is_a? Sass::Script::Number
# Program locations
get_modules=$(svn list --xml | xmlstarlet sel -T -t -m "//name" -c . -n)