Skip to content

Instantly share code, notes, and snippets.

Patrick Goddi fooqri

Block or report user

Report or block fooqri

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fooqri
fooqri / README.md
Last active Nov 10, 2019
dynamic client side searching for Hugo.io with Fuse.js
View README.md
View tab.json
{
"title": "Change tab key",
"rules": [
{
"description": "Change tab key to command+control+option+shift. (Post tab key when pressed alone)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "tab",
View spacebar-remap.json
{
"title": "Change spacebar",
"rules": [
{
"description": "Change spacebar to right-option if pressed with other keys (Post spacebar when pressed alone)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "spacebar",
@fooqri
fooqri / emacs-w-tensorflow-notes.md
Last active Mar 9, 2017
Notes for adding tensorflow support to Emacs Org-mode code blocks on OS X
View emacs-w-tensorflow-notes.md
@fooqri
fooqri / ql-thoughts.sh
Last active Dec 10, 2016
A few alias functions for using qlmanage to create png files. Used for creatingpng previews of iThoughtsX files that can be embedded in org-mode notes.
View ql-thoughts.sh
# qlmanager is used to open quicklook view of a file from command line.
# see http://www.quicklookplugins.com/ for more plugins
# an alias to create a simple command to olen a quicklook view in background, showing no terminal messages
alias ql='function _qlfunc(){ qlmanage -p $@ >/dev/null 2>&1 &};_qlfunc'
# I use this to save png files using qlmanager into an images directory inside my org-mode notes dir.
# I use a lisp function that calles this comand when org-links are added to notes so I get a nice embedded png view
# of the file being linked to. Requires plugin for file type that creates png's
# I use for mindmaps, stl files, etc so canshow quicklook inside emacs org-mode for linked files
@fooqri
fooqri / create-ithoughts-file-link.el
Last active Dec 10, 2016
Org-Mode add link to iThoughtsX mindmap file. Create file if it doesn't exist.
View create-ithoughts-file-link.el
@fooqri
fooqri / IoTPlatformNotes.md
Last active Jan 4, 2016
IoT & Wearable Platform Notes
View IoTPlatformNotes.md

Here are a few notes about interesting dev boards I have used for "Internet of Things (IoT)" projects.

The ESP8266

The ESP8266 was developed as a wifi board, but its integrated micro controller makes it an interesting platform for lots of uses. By adding the Arduino Core you can program it using the Arduino environment. I have used ESP8266 on a number of projects successfully. It is a bit power hungry because of the wifi, but it has support for sleep mode between sensor readings and broadcasts that can prolong battery life. If the IoT device is connected to power then this is an easy choice, as it is so low cost, and wifi makes it easy to push data to a server.

Two nice boards are:

Additio

View MyIntelEdisonSetupGuide.md

Intel Edison Setup

Flash Edison with latest Image (Linux)

  • Plug both micro USB cables from Edison Dev board into linux pc, no power wall wart needed

in terminal (ttyUSB0 is example, could be ttyUSB1, etc based on usb port used.)

  • open a terminal and type sudo screen /dev/ttyUSB0 115200
  • reset edison using reset button
  • keep hitting a key until stop boot at a boot prompt
  • type run do_flash
View gist:5691402
(defun quick-copy-line ()
"Copy the whole line that point is on and move to the beginning of the next line.
Consecutive calls to this command append each line to the
kill-ring."
(interactive)
(let ((beg (line-beginning-position 1))
(end (line-beginning-position 2)))
(if (eq last-command 'quick-copy-line)
(kill-append (buffer-substring beg end) (< end beg))
(kill-new (buffer-substring beg end))))
@fooqri
fooqri / app_delegate.rb
Last active Dec 12, 2015
Excerpt from app delegate for setting up RestKit logging. I was getting an undefined constant error for RKLogConfigureByName, the standard way of setting up logging in restkit. It seems that the #define statements in /vendor/Pods/RestKit/Code/Support/RKLog.h are not getting picked up. I will need to investigate further but this quick workaround …
View app_delegate.rb
def init_restkit_logging
#define RKLogLevelOff -> RKlcl_vOff
#define RKLogLevelCritical -> RKlcl_vCritical
#define RKLogLevelError -> RKlcl_vError
#define RKLogLevelWarning -> RKlcl_vWarning
#define RKLogLevelInfo -> RKlcl_vInfo
#define RKLogLevelDebug -> RKlcl_vDebug
#define RKLogLevelTrace -> RKlcl_vTrace
# "restkit" "RestKit"
You can’t perform that action at this time.