Skip to content

Instantly share code, notes, and snippets.

View RafaelC457ro's full-sized avatar

Rafael Castro RafaelC457ro

  • Brazil
View GitHub Profile
@thiagosilr
thiagosilr / paisesPortuguesIngles.sql
Created November 9, 2012 13:30
Tabela MYSQL com o nome de todos os países em Português / Inglês
--
-- Estrutura da tabela `pais`
--
CREATE TABLE IF NOT EXISTS `pais` (
`paisId` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`paisNome` varchar(50) NOT NULL,
`paisName` varchar(50) NOT NULL,
PRIMARY KEY (`paisId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=253 ;
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@cmbaughman
cmbaughman / vagrant-win-howto.md
Last active September 7, 2018 09:15
Vagrant >=1.6 Windows Instructions

How to set up a Windows VM with Vagrant

Create your VM

==================

  1. Obtain a windows vm from Modern IE.
  • Win 8 OSX
curl -O -L "https://www.modern.ie/vmdownload?platform=mac&virtPlatform=virtualbox&browserOS=IE10-Win8.1&parts=5&filename=VMBuild_20131127/VirtualBox/IE10_Win8/Mac/IE10.Win8.For.MacVirtualBox.part{1.sfx,2.rar,3.rar,4.rar,5.rar}"
@nacholibre
nacholibre / gist:58072687059e4e386c8a
Last active April 18, 2017 12:03
Use guzzle with the default Stream Handler, without Curl or any other libraries.
<?php
$handler = new \GuzzleHttp\Ring\Client\StreamHandler();
$client = new GuzzleHttp\Client(['handler' => $handler]);
@dantman
dantman / gist.css
Last active April 17, 2018 22:07
Material Design sp units (px unit that scale to the user's font settings) using rems
html {
font-size: 14px;
}
/**
* PostCSS
* Use a custom PostCSS to convert #sp to rems by dividing the number by 14 and expressing it as #rem
*/
body {
@dudleyjosh
dudleyjosh / bits.js
Created April 26, 2016 18:51
Test, Set, Clear & Toggle bits in JavaScript
function bit_test(num, bit) {
return ((num >> bit) % 2 != 0)
}
function bit_set(num, bit) {
return num | 1 << bit;
}
function bit_clear(num, bit) {
return num & ~(1 << bit);