Skip to content

Instantly share code, notes, and snippets.

View cuibonobo's full-sized avatar

Jen Garcia cuibonobo

View GitHub Profile
@cuibonobo
cuibonobo / index.d.ts
Created April 18, 2020 16:17 — forked from eh-dub/index.d.ts
Sapper + Svelte + Typescript
// in $PROJECT_ROOT/typings/@sapper
declare module '@sapper/app' {
// from sapper/runtime/src/app/types.ts
// sapper doesn't export its types yet
interface Redirect {
statusCode: number
location: string
}
// end
@cuibonobo
cuibonobo / react-rollup-typescript.md
Created August 20, 2019 14:27 — forked from bcherny/react-rollup-typescript.md
react + rollup + typescript boilerplate

terminal:

npm i --save-dev rollup rollup-watch rollup-plugin-typescript typescript typings
npm i -S react react-dom
./node_modules/.bin/typings install react react-dom --save
mkdir src dist
touch src/index.tsx
@cuibonobo
cuibonobo / CustomEditorBase.cs
Created September 8, 2017 14:21 — forked from t0chas/CustomEditorBase.cs
Default Custom Inspector-Editor for Unity3D with ReorderableLists for arrays handling
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System.Collections.Generic;
using UnityEditor.AnimatedValues;
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)]
[CanEditMultipleObjects]
public class CustomEditorBase : Editor
{
@cuibonobo
cuibonobo / configure-mailgun
Created September 6, 2016 15:13 — forked from jgeewax/configure-mailgun
Script to configure Postfix for Mailgun
#!/bin/bash
# Configuration for the script
POSTFIX_CONFIG=/etc/postfix/main.cf
POSTFIX_SASL=/etc/postfix/sasl_passwd
function confirm () {
read -r -p "${1:-Are you sure? [Y/n]} " response
if [[ $response == "" || $response == "y" || $response == "Y" ]]; then
echo 0;
@cuibonobo
cuibonobo / fix-wordpress-permissions.sh
Last active August 28, 2016 06:18 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=haverstack # <-- wordpress owner
WP_GROUP=haverstack # <-- wordpress group
WP_ROOT=data # <-- wordpress root directory
@cuibonobo
cuibonobo / sidebar
Created July 10, 2016 21:48 — forked from shilman/sidebar
proxy_cache_path /var/cache/nginx/sidebar levels=1:2 keys_zone=SIDEBAR:10m inactive=24h max_size=1g;
upstream sidebar {
ip_hash;
server xxx.xxx.xx.xxx:80;
server yyy.yyy.yy.yyy:80;
}
server {
#!/usr/bin/env bash
# Original: http://thezinx.com/2013/10/29/create-bootable-dmg-iso-mavericks-app.html
V_BUILD=/Volumes/install_build
V_APP=/Volumes/install_app
T_SI_B=/tmp/mavericks
T_SI=$T_SI_B.sparseimage

LESS Coding Guidelines

Medium uses a strict subset of LESS for style generation. This subset includes variables and mixins, but nothing else (no nesting, etc.).

Medium's naming conventions are adapted from the work being done in the SUIT CSS framework. Which is to say, it relies on structured class names and meaningful hyphens (i.e., not using hyphens merely to separate words). This is to help work around the current limits of applying CSS to the DOM (i.e., the lack of style encapsulation) and to better communicate the relationships between classes.

Table of contents

@cuibonobo
cuibonobo / sparkline.svg
Created August 12, 2014 10:19 — forked from OllyHodgson/sparkline.svg
Stuart Langridge's Simple SVG sparklines — http://kryogenix.org/days/2012/12/30/simple-svg-sparklines — but using an object element instead of an embed. Worth investigating whether having many of these on a page will create many HTTP requests.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cuibonobo
cuibonobo / jsbin.tedoradu.html
Created July 27, 2014 15:23 — forked from anonymous/jsbin.tedoradu.html
Find text on a page similar to how browsers do it with the Find command.
<html>
<head>
</head>
<body>
<form name="f1" action=""
onSubmit="if(this.t1.value!=null && this.t1.value!='') findString(this.t1.value);return false">
<input type="text" name=t1 value="" size=20>
<input type="submit" name=b1 value="Find">
<p>This is some sample text.</p>
</form>