Skip to content

Instantly share code, notes, and snippets.

View jfgomez86's full-sized avatar

Jose Felix Gomez jfgomez86

View GitHub Profile
@jsbain
jsbain / navview_utils.py
Created August 21, 2018 15:24
navview_utils.py
import ui,console,time
from objc_util import on_main_thread
@on_main_thread
def get_top_view(navigation_view):
'''returns the top (aka visible) view from a navigation view'''
import ctypes
nc= navigation_view.objc_instance.navigationController()
tc=nc.topViewController()
v=tc.view()
return v.pyObject(restype=ctypes.py_object,argtypes=[])
@DenisFromHR
DenisFromHR / RPi_I2C_driver.py
Last active December 1, 2023 21:05
RaspberryPi I2C LCD Python stuff
# -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# added bits and pieces from various sources
# By DenisFromHR (Denis Pleic)
@jfgomez86
jfgomez86 / tweet.rb
Created July 29, 2011 16:10
Finding latest tweets by unique users
##
# Find latest *n* tweets, but don't repeat tweets by users.
# Example:
#
# If we have the following table:
#
# id | user_id | created_at
# 1 | 1 | 3 days ago
# 2 | 2 | 3 days ago
# 3 | 1 | 2 days ago
@jfgomez86
jfgomez86 / .zshrc
Created July 11, 2011 20:14
My .zshrc customizations
###
# Shortcut to projects directory: you can replace 'p' with your favorite word/character.
# Autocompleter enabled! Try: `p <tab>` ;)
#
PROJECTS_DIR="/Users/jfgomez86/Projects"
p() {
PROJECT_NAME="$1";
cd "$PROJECTS_DIR/$PROJECT_NAME";
}
@jfgomez86
jfgomez86 / Blueprint debug.
Created June 1, 2011 15:50 — forked from miguelperez/Blueprint debug.
Blueprint debug script. Just append this to the head of the HTML file that should be including the blueprint files.
<!-- I took this code from somewhere, just can recall now. -->
<script type="text/javascript">
function toggleGrid() {
var toggle = document.getElementById('toggleGrid');
var container;
if(toggle.innerHTML == 'Hide Grid') {
toggle.innerHTML = 'Show Grid';
ripClass('');
}
@jfgomez86
jfgomez86 / DevelopmentProcess.markdown
Created November 23, 2010 03:55
A Simplified Development Process

Introduction

In this document, the following roles are mentioned:

CLIENT: Also known as the Customer. The Client requests a service or product from us.

DEVELOPERS: Builds the website functionality and behavior. Translates designs produced by Designers to HTML/CSS + Business Code that drives the

@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh