Skip to content

Instantly share code, notes, and snippets.

View onezerodigits's full-sized avatar
⌨️
probably typing into a text file

onezerodigits

⌨️
probably typing into a text file
View GitHub Profile
@onezerodigits
onezerodigits / vap.js
Created October 12, 2020 14:01
AEM View As Published Bookmarklet
javascript:(function(){window.open(window.location.href.replace(/sites.html\//g, '').concat('','.html?wcmmode=disabled'),'_blank');})();
@onezerodigits
onezerodigits / nate.zsh-theme
Last active April 2, 2020 01:39
Minimal prompt layout for ZSH
#
# Nate Theme
# a riff of Cobalt2 Theme - https://github.com/wesbos/Cobalt2-iterm
# Changes: doesn't use background colors or require powerline fonts
# Tested on Mac OS only
# I'm using with Operator Mono SSm font and Misterioso iTerm color presets
#
##
### Segment drawing
# A few utility functions to make it easy and re-usable to draw segmented prompts
@onezerodigits
onezerodigits / example.html
Created November 12, 2019 21:15 — forked from kevinweber/example.html
AEM: Include another resource + modify tag and class name #data-sly-resource
<!--/* More: https://docs.adobe.com/docs/en/htl/docs/block-statements.html#resource */-->
<!--/* By default, the AEM decoration tags are disabled, the decorationTagName option allows to bring them back, and the cssClassName to add classes to that element. */-->
<div data-sly-resource="${'headline' @
resourceType='about-project/components/content/c34-section-headline',
decorationTagName='span',
cssClassName='className'
}"></div>
<!--/* More about the decoration tag: https://docs.adobe.com/docs/en/aem/6-3/develop/components/decoration-tag.html */-->
@onezerodigits
onezerodigits / AEM Dialog field examples
Last active March 6, 2020 13:55 — forked from kevinweber/buttongroup.xml
Sample XML file bits to use as a starting point for building component dialogs.
Examples below
@onezerodigits
onezerodigits / gulpfile.js
Created October 17, 2018 15:41
AEM Simple Gulp SASS
var gulp = require('gulp');
var sass = require('gulp-sass');
var postcss = require('gulp-postcss');
var autoprefixer = require('autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var app = 'ui.apps/src/main/content/jcr_root/apps/__YOURappName__/';
function styles() {
return gulp.src([app+'**/*.scss'])
.pipe(sourcemaps.init())
@onezerodigits
onezerodigits / brewredo.sh
Created August 19, 2018 20:43
Script to uninstall and reinstall brew apps, useful after migration
#!/bin/bash
for i in `brew list -1`
do
if [[ "$i" == python.* ]] || [[ "$i" == ruby.* ]]
then
continue
fi
brew rm --force $i && brew install $i
done
@onezerodigits
onezerodigits / server.py
Created May 20, 2018 01:16
Python HTTP server in one line
python -m SimpleHTTPServer 8080
@onezerodigits
onezerodigits / showstart
Created May 4, 2018 01:03
Stream to Twitch from Raspberry Pi
#!/bin/bash
raspivid -o - -t 0 -vf -hf -w 1640 -h 1232 -fps 40 -b 6000000 | avconv -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://live-atl.twitch.tv/app/UPDATE_KEY_HERE
@onezerodigits
onezerodigits / showsover
Created April 24, 2018 23:35
End the Raspberry Pi video stream
#!/bin/bash
sudo pkill -f "raspivid"
sudo pkill -f "avconv"
@onezerodigits
onezerodigits / Install AVCONF
Last active April 30, 2018 23:39
Raspberry Pi Stream to Twitch
sudo apt-get update
sudo apt-get install libav-tools