Skip to content

Instantly share code, notes, and snippets.

View matagus's full-sized avatar
🐿️

Matías Agustín Méndez matagus

🐿️
View GitHub Profile
@matagus
matagus / booting-and-flashing.md
Last active August 29, 2015 14:00
Flashing Firefox OS for Geekphone
  • Download the image you want to flash from http://downloads.geeksphone.com/ according to the geekphone model you have (keon, peak or revolution)
  • unzip .zip
  • cd
  • If you look at the content of the directory you'll see it contains adb and fastboot Android platform tools.
  • Start adb server: sudo ./adb start-server
  • Turn on your phone and enable "Remote Debugging" under Developer settings section.
  • Plug your phone to your computer using your USB wire.
  • Check that your computer is listening to your phone: ./adb devices. You'll see something like this:
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
require "cjson"
-- Generic decoder for JSON logs. This will extract all JSON
-- keys and add them to the `Fields` variable of the created
-- Heka message.
--
-- Example use:
--
-- [NginxJsonLogDecoder]
-- type = "SandboxDecoder"
// using jQuery
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
@matagus
matagus / vimrc
Last active August 29, 2015 14:06
vim config using vim-bundle (vundle)
" disable vi compatibility
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle
Bundle 'gmarik/vundle'
@matagus
matagus / favorite.js
Created September 23, 2014 17:46
favorite.js for django-favit with support for dynamic items added at any time
$(document).ready(function() {
$(".endless_container").on("click", ".btn.favorite", function() {
var $obj = $(this);
var target_id = $obj.attr('id').split('_')[1];
$obj.prop('disabled', true);
$.ajax({
url: $obj.attr('href'),
type: 'POST',
data: {target_model: $obj.attr('model'),
target_object_id: target_id},
@matagus
matagus / APIs-webliography.md
Last active June 24, 2022 00:03
Links to posts, talks and slides talking about API design, arquitecture, testing, tools, etc
@matagus
matagus / SourceCodeSearchEngines.md
Created October 7, 2015 09:39 — forked from phillipalexander/SourceCodeSearchEngines.md
Source Code Search Engines You Can Use For Programming Projects

Source Code Search Engines

NOTE: This list is almost entirely copy/pasted from THIS awesome article. I've made my own personal edits (adding some additional content) which is why I keep it here.

Every day meanpath crawls over 200 million websites capturing the visible text, HTML source code, CSS and Javascript. This information is used by many companies to monitor the growth of web facing technology.

@matagus
matagus / .vimrc
Last active February 12, 2022 12:46
My current .vimrc file. Using vim-bundle, with support for Python, Django, Markdown, HTML, Javascript, Scala, node.js and CSS.
" disable vi compatibility
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle
Bundle 'gmarik/vundle'
@matagus
matagus / .gitconfig
Last active February 15, 2016 11:58
My .gitconfig with a lot of aliases 👽
[user]
name = matagus
email = [email protected]
[color]
ui = auto
[color "status"]
added = cyan
changed = green