Skip to content

Instantly share code, notes, and snippets.

View jacksonfdam's full-sized avatar
💻
Coding...

Jackson F. de A. Mafra jacksonfdam

💻
Coding...
View GitHub Profile
MOBILE = window.MOBILE || {};
MOBILE.QUERIES = (function() {
'use strict';
// declare document and windows in variables for performace
var doc = document,
win = window;
var _private = {
set: function(args) {
// use the HTML5 API matchMedia to target phones and tablets
function html5_canvas() {
// declare variables
var $canvas, $element, $circle, $rect, $triangle, $x, $limit, $angle, $centerY, $range, $speed;
//dom block element wrapper
$element = doodle.createDisplay("canvas");
//creates new canvas element wrapper
$canvas = $element.createLayer();
// function to create a random number
function formatSql($sql) {
return preg_replace(
'/(select|from|(left |right |natural |inner |outer |cross |straight_)*join|where|limit|update |set|insert |values)/i',
"\n$1\n ", str_replace("\n", '', $sql)
);
}
<?php
// Outputs all POST parameters to a text file. The file name is the date_time of the report reception
$fileName = date('Y-m-d_H-i-s').'.txt';
$file = fopen($fileName,'w') or die('Could not create report file: ' . $fileName);
foreach($_POST as $key => $value) {
$reportLine = $key." = ".$value."\n";
fwrite($file, $reportLine) or die ('Could not write to report file ' . $reportLine);
}
fclose($file);
?>

Setup Mac OS X Mavericks

Passo a passo que uso após reinstalar o sistema do 0, para não ter que ficar lembrando onde esta tudo, criei esse 'passo a passo' para me ajudar, ja que faço isso a cada novo sistema da Apple :)

Configuração

1. Update sistema

@jacksonfdam
jacksonfdam / adb+
Created November 22, 2013 04:05 — forked from christopherperry/adb+
#!/bin/bash
# Script adb+
# Usage
# You can run any command adb provides on all your currently connected devices
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command>
#
# Examples
# ./adb+ version
# ./adb+ install apidemo.apk
# ./adb+ uninstall com.example.android.apis
# based on the import script by icebreaker, which is based on mojombo's
# https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/wordpress.rb
# https://gist.github.com/303570
# edited to rewrite image URLs to use my CloudFront URL
require 'rubygems'
require 'sequel'
require 'fileutils'
# $ export DB=my_wpdb
#!/bin/bash
#
# Programa: create.sh
# Autor: Vitor Britto
#
# Descrição:
# Este script será responsável pela criação de uma estrutura
# para novos projetos, incluindo a integração de tecnologias
# utilizadas atualmente nos projetos web
#!/bin/bash
#
# General
# ---------------------------------------------------
# Create a data URI from a file
datauri() {
local mimeType=""
{
"name": "",
"version": "",
"private": true,
"author": "Vitor Britto <[email protected]>",
"description": "",
"bin": {},
"scripts": {
"start": "",
"test": ""