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
@stammy
stammy / wordpress_importer.rb
Last active March 27, 2022 09:39
Import a WordPress database and generate markdown files for Jekyll
# View my Jekyll blog http://paulstamatiou.com and my jekyll migration post http://paulstamatiou.com/how-to-wordpress-to-jekyll/
#
#
# 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'
@chrisjacob
chrisjacob / README.md
Created February 18, 2011 03:44
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@akagomez
akagomez / gist:1025933
Created June 14, 2011 21:26 — forked from hunterloftis/gist:1025903
Install Git, Node, NPM, Nginx, PHP (Fast CGI), CouchDB, and MySQL on Ubuntu 10.04 LTS
# This should be run on a new Linode Ubuntu 32-bit 10.04 image as root to prepare it for Nginx, PHP, MySQL, Node, CouchDB environment
# To start, something like this works:
# scp prepare_server.sh root@123.456.789.10:/root
# First, install basic linux utilities (compilers, git, libssl)
cd /root
mkdir /src
cd src
@TCotton
TCotton / fabric.js
Created July 14, 2011 19:14
Creates pretty shapes with fabric.js
function html5_canvas() {
// declear variables
var $canvas, $rect, $circle, $triangle, $i, $limit, $width, $height;
//create canvas object with div id
$canvas = new fabric.Canvas('canvas_1');
// create Circle - note radius
@TCotton
TCotton / doodle.js
Created July 16, 2011 18:17
Using doodle.js HTML Canvas framework
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
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@christopherperry
christopherperry / adb+
Created July 30, 2012 16:12
A bash script that let's you issue adb commands to multiple devices at once
#!/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
@grifo
grifo / fizzbuzz-fibo.js
Created August 2, 2012 12:05
Desafios do Code n' Bier de 01 agosto de 2012
function fizzbuzz(a, b) {
for (var i = a; i <= b; i++) {
if (i % 3 == 0 && i % 5 == 0) {
console.log("Fizzbuzz");
} else if (i % 5 == 0) {
console.log("Buzz");
} else if (i % 3 == 0) {
console.log("Fizz");
} else {
console.log(i);
@henriquemoody
henriquemoody / sql_formater.php
Created August 7, 2012 00:12 — forked from augustohp/sql_formater.php
SQL formater for PHP by @alganet
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)
);
}
@zenorocha
zenorocha / Foca no código
Created August 27, 2012 14:42
Foca no código
/* Véi, foca no código
.---.
/o o\
__(= " =)__
//\'-=-'/\\
) (_
/ `"=-._
/ \ ``"=.