Skip to content

Instantly share code, notes, and snippets.

View IsaacCisneros's full-sized avatar
💭
...uploading myself to the blockchain.

Isaac Cisneros IsaacCisneros

💭
...uploading myself to the blockchain.
View GitHub Profile
@IsaacCisneros
IsaacCisneros / introrx.md
Created November 3, 2015 12:52 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
/*Queue - Linked List implementation*/
#include<stdio.h>
#include<stdlib.h>
struct Node {
int data;
struct Node* next;
};
// Two glboal variables to store address of front and rear nodes.
struct Node* front = NULL;
struct Node* rear = NULL;
@IsaacCisneros
IsaacCisneros / gist:5ae6dde98ea09378df8d
Created May 20, 2015 22:05
Basic Auth [PS | GitHub APIv3]
$user = 'user'
$pass = 'pass'
$pair = "$($user):$($pass)"
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
$basicAuthValue = "Basic $encodedCreds"
$Headers = @{
@IsaacCisneros
IsaacCisneros / gist:feacd10172d0ba4adb53
Created April 20, 2015 06:09
GLib Collections Test
#include <stdio.h>
#include <glib.h>
void __print(char *data, char *user_data){
printf("DATA: [%s] ADRESS: [%d]\n", data, &(*data));
}
gboolean __print_hash_table(gpointer key, gpointer data, gpointer user_data){
printf("HASH ITEM: %d\n", GPOINTER_TO_INT(key));
g_list_foreach((GList *)data, (GFunc)__print, NULL);
@IsaacCisneros
IsaacCisneros / gist:d7f3cf4bf6c0573d0570
Created April 13, 2015 07:59
Sublime Text [Regular expression - Cheat sheet]
> Regular Expressions Cheat Sheet
> A regular expression specifies a set of strings that matches it. This cheat sheet is based off Python 3's Regular Expressions (http://docs.python.org/3/library/re.html) but is designed for searches within Sublime Text.
> Special Characters
\ Escapes special characters or signals a special sequence.
. Matches any single character except a newline.
^ Matches the start of the string.
$ Matches the end of the string.
* Greedily matches 0 or more repetitions of the preceding RE.
*? Matches 0 or more repetitions of the preceding RE.
@IsaacCisneros
IsaacCisneros / gist:8248661be44cc7273e7e
Created August 6, 2014 14:28
Count 1's in binary number
public class Weekly02 {
public static void main (String args[]){
Scanner scanner = new Scanner(System.in);
int arraySize = scanner.nextInt();
int mask = 1;
for(int x=0; x<arraySize; x++){
int i = scanner.nextInt();
int counter = 0;
do {
@IsaacCisneros
IsaacCisneros / Main.java
Created July 7, 2014 16:03
SPOJ/ADDREV
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int steps = scanner.nextInt();
for(int x=0; x<steps; x++){
System.out.println(reverse(reverse(scanner.nextInt()) + reverse(scanner.nextInt())));