Skip to content

Instantly share code, notes, and snippets.

View jcarlos7121's full-sized avatar

Juan Carlos jcarlos7121

View GitHub Profile
@jcarlos7121
jcarlos7121 / gist:5504349
Created May 2, 2013 18:41
.net for carlotes
void send(string regId)
{
var applicationID = "xxxxxxxx";
var SENDER_ID = "xxxxx";
var value = txtMsg.Text;
WebRequest tRequest;
tRequest = WebRequest.Create("https://android.googleapis.com/gcm/send");
tRequest.Method = "post";
@jcarlos7121
jcarlos7121 / gist:5855499
Created June 25, 2013 02:42
Compilar msp430
#!/usr/bin/python
import os
def main():
print "=======CompileMe Version 1.0========="
print "Software A la medida...."
print "Javier Jorge Perez Ontiveros --- Juan Carlos Hinojo"
c = raw_input("Dame el nombre del archivo a compilar .c: ")
r = raw_input("Dame el nombre del archivo a generar: ")
@jcarlos7121
jcarlos7121 / gist:5855757
Created June 25, 2013 03:41
Cambia por tu mmcu
#include <msp430g2231.h>
int main(int argc, char const *argv[])
{
WDTCTL = WDTPW + WDTHOLD; // Set WDT to stop
P1DIR = 0x01; // Set P2.1 is an output
while(1)
{
if( (P1IN & 0x08) != 0) {
// SWITCH IS OPEN SO TURN OFF LED
@jcarlos7121
jcarlos7121 / gist:5855836
Created June 25, 2013 04:00
Pa que lo tengas bien
#include <msp430g2231.h>
int main(int argc, char const *argv[])
{
WDTCTL = WDTPW + WDTHOLD; // Set WDT to stop
P1DIR = 0x01; // Set P2.1 is an output
while(1)
{
if( (P1IN & 0x08) != 0) {
// SWITCH IS OPEN SO TURN OFF LED
@jcarlos7121
jcarlos7121 / gist:5887053
Created June 28, 2013 18:48
Log tryingstill
[Fri Jun 28 13:13:10 2013] Disconnecting from workspace jcarlos7121/tryingstill
[Fri Jun 28 13:13:10 2013] Disconnected.
[Fri Jun 28 13:13:10 2013] Connecting to floobits.com:3448
[Fri Jun 28 13:13:12 2013] Connected!
[Fri Jun 28 13:47:37 2013] Connecting to floobits.com:3448
[Fri Jun 28 13:47:37 2013] Connected!
[Fri Jun 28 13:47:37 2013] writing NO NAME: {'version': '0.03', 'room_owner': 'jcarlos7121', 'room': 'tryingstill', 'username': 'jcarlos7121', 'platform': 'win32', 'client': 'SublimeText-3', 'secret': 'rhg3blws5f1xkc6f6b8g0ojr9'}
[Fri Jun 28 13:47:37 2013] 1 items in q
[Fri Jun 28 13:47:37 2013] Sublime loaded C:\Users\JuanCarlos\floobits\share\msgs.floobits.log
@jcarlos7121
jcarlos7121 / gist:5905639
Created July 1, 2013 23:41
me vas a pegar u.u
<?php
if (is_dir("../SocThumb/".$id)) {
$scaneo =scandir("../SocThumb/".$id);
$imagenes->thumbnail = "SocThumb/".$id."/".$scaneo[2];
}
if (is_dir("../SocPrincipal/".$id)) {
$scaneo = scandir("../SocPrincipal/".$id);
$imagenes->principal = "SocPrincipal/".$id."/".$scaneo[2];
}
#!/bin/bash
# cb-compmgr
# Openbox Pipe Menu for xcompmgr & cairo-compmgr
# Written for CrunchBang Linux <http://crunchbanglinux.org/>
# by Philip Newborough (aka corenominal) <[email protected]>
# ------------- Set xcompmgr command options -----------------------------------
if [ -f /home/$USER/.config/xcompmgr/xcompmgrrc ]; then
. /home/$USER/.config/xcompmgr/xcompmgrrc
#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------
# For more information about tint2, see:
# http://code.google.com/p/tint2/wiki/Welcome
#
# For more config file examples, see:
# http://crunchbanglinux.org/forums/topic/3232/my-tint2-config/
# Background definitions
#!/usr/bin/conky -d -c
## .conkyrc configuration
alignment bottom_left
background yes
border_margin 5
border_width 5
color0 555555 #
color1 FCAF3E # zolty
color2 2a2a2a # braz
color3 a82553 # rozowy f71f84
ORG 0000H
MOV R1, #10001110B
MOV A,R1
RLC A
MOV R1, A
MOV P1.0, C
MOV A,R1
RLC A
MOV R1, A
MOV P1.1, C