Skip to content

Instantly share code, notes, and snippets.

View mikebsg01's full-sized avatar
📚
Creativity Is Intelligence Having Fun!

Michael Serrato mikebsg01

📚
Creativity Is Intelligence Having Fun!
View GitHub Profile
@mikebsg01
mikebsg01 / MaxHeapSort.cpp
Last active November 19, 2017 12:31
Max-Heap Sort (Algorithm) - By: Michael Serrato
/*
* ALGORITHM: MAX-HEAP SORT
*
* @author Serrato Guerrero Michael Brandon <mikebsg01@gmail.com>
*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <sstream>
using namespace std;
@luisfc
luisfc / install nodejs, npm and gulp
Last active October 3, 2020 16:37
Install nodejs, npm and gulp ubuntu 16.04
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
## Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
@eikes
eikes / gist:5a64b661022c756bd6522ed94770e2a6
Created July 4, 2016 14:02
List of Ruby on Rails Timezone names and their alias
["Africa/Algiers", "West Central Africa"],
["Africa/Cairo", "Cairo"],
["Africa/Casablanca", "Casablanca"],
["Africa/Harare", "Harare"],
["Africa/Johannesburg", "Pretoria"],
["Africa/Monrovia", "Monrovia"],
["Africa/Nairobi", "Nairobi"],
["America/Argentina/Buenos_Aires", "Buenos Aires"],
["America/Bogota", "Bogota"],
["America/Caracas", "Caracas"],
@MelleB
MelleB / Kivy Aligned TextInput
Last active February 2, 2021 11:34
Kivy Aligned Text Input - halign + valign for TextInput
Note: This just aligns the position of the textblock, not the text itself.
@mikebsg01
mikebsg01 / gist:c969ddaefc6b3e9594c7
Last active March 12, 2017 21:47
Problema Inversiones (AC) - IOI-Etapa1-Problemset15 [Optimizar Solución]
#include <bits/stdc++.h>
#define X first
#define Y second
#define sz size
using namespace std;
typedef long long int lli;
int C,N;
lli Limite = 0;
lli AC = 0;
@mikebsg01
mikebsg01 / gist:6be6c7a6223cdcb607e4
Last active March 12, 2017 21:27
Problema Acciones (AC) - IOI-Etapa1-Problemset8
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>
#include <utility>
#define optimize ios_base::sync_with_stdio(0);cin.tie(0);
#define all(v) v.begin(), v.end()
#define first(v, n) v.begin(), v.begin()+n
#define second(v, n) v.begin()+n, v.begin()+(2*n)
@michaelaguiar
michaelaguiar / pgsql_error.php
Created February 7, 2012 18:15
PostgreSQL Error Codes => Descriptions
<?php
/**
* @author: Michael Aguiar <mike@aliasproject.com>
* @desc: An array of PostgreSQL Error Codes' => Descriptions
*/
$PGError = array(
'00000' => 'SUCCESSFUL COMPLETION',
'01000' => 'WARNING',
'0100C' => 'DYNAMIC RESULT SETS RETURNED',