Skip to content

Instantly share code, notes, and snippets.

View cuibonobo's full-sized avatar

Jen Garcia cuibonobo

View GitHub Profile
@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>
@cuibonobo
cuibonobo / jsbin.ferop.css
Created July 27, 2014 15:38
Highlight search terms on the page on keyup or change. Uses jQuery.
.highlight {
background-color: #fff34d;
-moz-border-radius: 5px; /* FF1+ */
-webkit-border-radius: 5px; /* Saf3-4 */
border-radius: 5px; /* Opera 10.5, IE 9, Saf5, Chrome */
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); /* FF3.5+ */
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); /* Saf3.0+, Chrome */
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); /* Opera 10.5+, IE 9.0 */
}
@cuibonobo
cuibonobo / browser_paint.md
Last active August 29, 2015 14:04
Painting applications in HTML5 + Javascript

Overall I think the best-executed lines are in the first link - slightly anti-aliased and with no vector-jitter.

Resources for Wacom pressure-sensitivity:

@cuibonobo
cuibonobo / mongo_rpi.md
Created July 29, 2014 01:23
Installing Mongo on a Raspberry Pi

Source

mongoDB 2.6 and Node.js 0.10.29 on Raspberry Pi

Jul 21

andy[Raspberry Pi][1] [mongodb][2], [nodejs][3]

![mongoDB on Raspberry Pi][4]A while back, I compiled mongoDB 2.1 for Raspberry Pi based upon instructions found on other sites and kind work by developers sharing code on Github. I acquired a Raspberry Pi B+ and tried to compile mongoDB as I had done previously. I quickly found out that the (old) compiled version (2.1.1) no longer functions under Raspian.

@cuibonobo
cuibonobo / gist:c5988b551eed098eaab1
Created July 29, 2014 16:51
Using nginx as a dynamic proxy to arbitrary URLs
http://stackoverflow.com/questions/12376618/nginx-dynamic-proxy-redirection
http://www.nginx-discovery.com/2011/05/day-51-proxypass-and-resolver.html
[Source](http://daverupert.com/2014/07/rwd-bloat-part-ii/ "Permalink to RWD Bloat Part II - daverupert.com")
# RWD Bloat Part II - daverupert.com
Building off of my [previous post on RWD Bloat][1], the following is step-by-step how I made my site faster over the course of a few days. For the purposes of this test, I'm hyper-focused on my Speed Index numbers for my Home and Article templates (the 2 most visited templates of my site). Here is my baseline:
Home
Article
@cuibonobo
cuibonobo / smtp-issues.md
Created August 4, 2014 22:30
Getting the help desk to send emails
  • Added EPEL repository with rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  • Did yum update for good measure
  • Installed SSMTP with yum install ssmtp
  • Edited /etc/ssmtp/ssmtp.conf to look like this:
mailhub=smtp.gmail.com:587
UseSTARTTLS=YES
FromLineOverride=YES
AuthUser=helpdesk@gmail.com
@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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

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 / kivent_install.md
Created September 18, 2014 02:00
Installing KivEnt on Mac OS X.

Tested on Mac OS X 10.8.5 and 10.9.3.

Not for the faint of heart. Before we begin, you will need to install XQuartz, Homebrew, and virtualenv.

I'm using virtualenv to isolate your global system settings from the KivEnt installation because it's still under heavy development and it's very messy. We'll also be using the virtual environment folder to install Kivy, Cymunk, and KivEnt without needing to add them to your repository or your .gitignore file.

Now follow these steps carefully and you should be up and running:

  • Gain access to homebrew-headonly with brew tap homebrew/headonly. You may want to do a brew update for good measure.
  • SMPEG was moved to homebrew-headonly, so install it with brew install --HEAD smpeg