Skip to content

Instantly share code, notes, and snippets.

View nonissue's full-sized avatar
💭
¯\_(ツ)_/¯

Andy Williams nonissue

💭
¯\_(ツ)_/¯
View GitHub Profile
import 'dart:math';
import 'package:flutter/material.dart';
const _duration = Duration(milliseconds: 15);
double randomBorderRadius() {
return Random().nextDouble() * 64 * 1.5;
}
typeHi = hs.timer.doEvery(1, function() hs.alert('hi') end)
hs.hotkey.bind({'cmd','ctrl','alt'}, "0", "Toggled typeHi", function() if typeHi:running() then typeHi:stop() else typeHi:start() end end)
@nonissue
nonissue / machine.js
Last active October 30, 2019 06:27
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@nonissue
nonissue / machine.js
Last active October 2, 2019 10:46
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@nonissue
nonissue / sendSequence.lua
Last active January 24, 2019 23:49
Sends a sequence of keystrokes (including 'return') when a hotkey is pressed.
--[[
Filling request from: https://www.reddit.com/r/hammerspoon/comments/ai5qtg/request_adding_a_series_of_commands_upon_a_key/
by: @nonissue / questions, comments: hello@nonissue.org
license: MIT
The following code makes the key combo of CMD + CTRL + OPT + R
send the following key presses (in this order):
r
[return]
#/bin/bash
sudo mkdir /Volumes/ESP && sudo mount -t msdos /dev/disk0s1 /Volumes/ESP && sudo bless --mount /Volumes/ESP --setBoot --file /Volumes/ESP/efi/refind/refind_x64.efi --shortform && sudo diskutil unmount /Volumes/ESP && rm -rf /Volumes/ESP
@nonissue
nonissue / iPhone_ringtone.sh
Last active November 5, 2018 04:29 — forked from oboje/iPhone_ringtone.sh
Create iPhone ringtone from mp3 using ffmpeg
# Updated so it can handle all files in a directory
# And also, so that it doesn't use the libfaac encoder
for i in *.mp3; do ffmpeg -i "$i" -ac 1 -ab 128000 -f mp4 -c:a aac -y -t 4 "TONE-${i%.*}.m4r"; done
@nonissue
nonissue / scss_baseline_hack.scss
Created February 22, 2017 06:07
scss_baseline_hack.scss
@import "config";
// @function exponent() taken from Sassy-math https://github.com/Team-Sass/Sassy-math.
@function exponent($base, $exponent) {
// Thanks to @HugoGiraudel https://github.com/hiulit/Sassy-Gridlover/issues/4
@if pow(2, 2) == 4 {
@return pow($base, $exponent);
}
// Resets value.
$value: $base;
--simulate flux
-- Starts hammerspoons location services api
hs.location.start()
-- Stores current location as local lua variable
local loc = hs.location.get()
-- Stops hammerspoon location services api as we have location we need
hs.location.stop()
<head>
<script src="//tinymce.cachefly.net/4.2/tinymce.min.js"></script>
</head>
<template name="PanelEditAbout">
<div class="container {{loadingHide}}">
<h3 class="text-center">Edit About Us</h3>
<a href="/someroute">some other route</a>
<br>
<h1>TinyMCE Getting Started Guide</h1>