Skip to content

Instantly share code, notes, and snippets.

View carloscarcamo's full-sized avatar
🏠
Working from home

Carlos Cárcamo carloscarcamo

🏠
Working from home
View GitHub Profile
@carloscarcamo
carloscarcamo / generator.rb
Last active December 31, 2015 16:19 — forked from kevinkorb/generator.rb
Aptana Getters and Setters generator for php.
require 'ruble'
bundle do |bundle|
bundle.display_name = 'phpGetterSetterGenerator'
end
@@COUNT = 1
command 'Getter/Setter generator' do |cmd|
cmd.scope = 'source.php'
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
<script src="skulpt.min.js" type="text/javascript"></script>
<script src="skulpt-stdlib.js" type="text/javascript"></script>
</head>
<body>
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
#!/bin/bash
# for an "svn pristine text not present" error like this:
# svn: E155010: Pristine text 'd6612ee6af5d9fb4459cbe7e2e8e18f7fb4201f8' not present
# you can delete the file and retrieve it with svn up
# (if you have local modifications, make up your own plan)
# -
# Run this script from the root of the working copy.
# It retrieves the file that's causing the error from wc.db
# usage example : ./svn-pristine-find.sh d6612ee6af5d9fb4459cbe7e2e8e18f7fb4201f8
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function ajaxCall(url, parameters, successCallback) {
$.ajax({
type: 'POST',
dataType: 'json', //la funccion success te devolvera un json
url: url,
data: parameters,
import csv
from collections import defaultdict
with open('/Users/adam/Downloads/languages-2014.csv', 'r') as f:
results_2014 = [row for row in csv.reader(f)][1:]
with open('/Users/adam/Downloads/languages-2013.csv', 'r') as f:
results_2013 = [row for row in csv.reader(f)][1:]
with open('/Users/adam/Downloads/languages-2012.csv', 'r') as f:
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
@carloscarcamo
carloscarcamo / README.md
Last active September 7, 2015 22:39 — forked from danasilver/README.md
Jekyll Pygments/Redcarpet Global Configs

Jekyll Pygments/Redcarpet Global Configs

A Jekyll plugin that enables global configuration options for Pygments.

  • Add pygments_global_config.rb to my-jekyll-project/_plugins/.

  • Add Pygments options to _config.yml

markdown: redcarpet
@carloscarcamo
carloscarcamo / install_cgroup_debian_wheezy.sh
Last active September 15, 2015 17:43 — forked from lambdalisue/install_cgroup_debian_wheezy.sh
Install cgroup-bin in Debian Wheezy with a patch
#!/usr/bin/env bash
#==============================================================================
#
# Install cgroup-bin in Debian Wheezy
#
# The following required files in a cgroup-bin package of debian wheezy are
# missing. That's why this script get these files from a package of debian
# squeeze while original init.d scripts of cgroup were not regulated to use
# in debian system.
#