Skip to content

Instantly share code, notes, and snippets.

View carlosdelfino's full-sized avatar
💭
Estudando Salesforce e seu ecosistema

Carlos Delfino carlosdelfino

💭
Estudando Salesforce e seu ecosistema
View GitHub Profile
@carlosdelfino
carlosdelfino / enviando_sms.ino
Last active August 29, 2015 14:02 — forked from anonymous/gist:6c1c43beca7ae04cad74
um exemplo de código para envio de SMS, o codigo pode ser melhorado e optimizado em muitos pontos.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); //RX, TX
//Ligando o Shield GSM SIM900.
int powerkey = 5;
int statuspin = 6;
int pinState = 0;
@carlosdelfino
carlosdelfino / LaTeX.sh
Last active August 29, 2015 14:26 — forked from ytsutano/LaTeX.sh
TextWrangler: automated LaTeX compilation.
#!/bin/bash
# Change the current directory to the document path.
cd "${BB_DOC_PATH%/*}"
# Update PATH.
PATH=$PATH:/usr/bin/:/usr/local/bin/
PATH=$PATH:/usr/local/bin:/usr/X11/bin:/usr/texbin:/opt/local/bin
# Pre-compute the file names used.
@carlosdelfino
carlosdelfino / bitly.rb
Last active August 29, 2015 14:27 — forked from jalcine/bitly.rb
An Octopress / Jekyll plugin to provide a tag that automatically generates a bit.ly short-link for the current page in reference.
##
## @author Jacky Alcine <me@jalcine.me>
## @see [TODO: Add URL to post about bit.ly URLs.]
##
## Add in Bit.ly URL support to pages.
require "bitly"
# Ensure use of new API.
Bitly.use_api_version_3
<?php
require_once "lib/spyc.php";
$obj = Spyc::YAMLLoad('videos.yml');
//print_r($obj);
foreach($obj as $grupo){
echo "<h1>".$grupo['video']."</h1>";
echo "<h3><strong>Arquivo:</strong>".$grupo['arquivo']."</h2>";
echo "<p>".$grupo['descricao']."</p>";
@carlosdelfino
carlosdelfino / gist:2473612
Created April 23, 2012 20:28 — forked from fnando/gist:2420869
My JavaScript Guidelines

Licence (MIT Licence)

Copyright (c) 2011 Simon Walker

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

/*****************
By Param Aggarwal
www.feemo.in
AccPOV
Uses an accelerometer to sense when it is being waved in the air.
Uses Arduino Decimilia and Accelerometer and a custom made shield for the Arduino.
*******************/
// Display goes on PORTD
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev
@carlosdelfino
carlosdelfino / AndroidManifest.xml
Created March 1, 2018 06:05 — forked from nilsmehlhorn/AndroidManifest.xml
Android push notifications with EddyVerbruggen/nativescript-plugin-firebase
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
@carlosdelfino
carlosdelfino / after_res_hooks.js
Created July 24, 2018 04:36 — forked from pasupulaphani/after_res_hooks.js
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups