Skip to content

Instantly share code, notes, and snippets.

View mojavelinux's full-sized avatar

Dan Allen mojavelinux

View GitHub Profile
@briandominick
briandominick / asciidoc-static.adoc
Last active November 4, 2024 02:56
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 (https://app.netlify.com/account/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
j-po / gitstack.sh
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
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
@jordan-brough
jordan-brough / git-recent
Last active September 11, 2024 21:46
Git: Display a list of recently checked out branches/tags/commits
#!/usr/bin/env bash
# Source: https://gist.github.com/jordan-brough/48e2803c0ffa6dc2e0bd
# See also: https://stackoverflow.com/a/25095062/58876
# 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
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 {
jcenter()
}
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
piscisaureus / pr.md
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 = [email protected]:joyent/node.git

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
paulmillr / active.md
Last active November 8, 2024 13:04
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

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

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
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
#!/bin/bash
# Program locations
xmlstarlet=/usr/bin/xmlstarlet
git=/usr/bin/git
phase1_dir=import-phase1
phase2_dir=import-phase2
get_modules=$(svn list --xml http://anonsvn.jboss.org/repos/seam/modules/ | xmlstarlet sel -T -t -m "//name" -c . -n)
get_parent=1