Skip to content

Instantly share code, notes, and snippets.

View syropian's full-sized avatar
🐝

Collin Henderson syropian

🐝
View GitHub Profile
{
"name": "Bourbon Test",
"version": "1.0.0",
"repository": "",
"devDependencies": {
"node-bourbon": "~1.0.0",
"grunt": "~0.4.4",
"grunt-contrib-sass": "~0.7.3"
}
}
module.exports = function(grunt) {
// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
loadPath: require('node-bourbon').includePaths,
style: 'compressed'
},
$(document.getElementById("preview").contentWindow.document).on("dragover drop", function(e) {
return e.preventDefault();
});
2018/07/01 14:15:41 [error] 98678#0: *1 connect() to unix:/Users/user/.valet/valet.sock failed (61: Connection refused) while connecting to upstream, client: 127.0.0.1, server: astral.test, request: "GET /favicon.ico HTTP/2.0", upstream: "fastcgi://unix:/Users/user/.valet/valet.sock:", host: "astral.test", referrer: "https://astral.test/"
const groupSiblingsByKeyValue = (arr, k, v) => {
return arr
.map((o, i, a) => {
if (o[k] === v) {
let j = i;
const group = [];
while (a[j][k] === v) {
group.push(a[j]);
a[j] = false;
j++;
@syropian
syropian / async-task-queue.js
Last active March 4, 2021 17:54
Lets you queue up async tasks and executes them sequentially
const queueTask = (() => {
let pending = () => Promise.resolve();
const run = async (fn) => {
try {
await pending;
} finally {
return fn();
}
};
@syropian
syropian / withHiddenHomeIndicator.js
Created August 22, 2022 23:13
An Expo config plugin to automatically hide the home indicator on iOS
const { withAppDelegate } = require('@expo/config-plugins')
function withHiddenHomeIndicator(expoConfig) {
return withAppDelegate(expoConfig, (config) => {
const { modResults } = config
const { contents } = modResults
const lines = contents.split('\n')
const importIndex = lines.findIndex((line) => /^#import "AppDelegate.h"/.test(line))