Skip to content

Instantly share code, notes, and snippets.

View jeanlucaslima's full-sized avatar
😃

Jean Lucas jeanlucaslima

😃
View GitHub Profile
willDestroyElement: function() {
var clone = this.$().clone();
this.$().parent().append(clone);
clone.fadeOut();
}
@jeanlucaslima
jeanlucaslima / gist:01f8a577bf6ed266548c
Last active August 29, 2015 14:13
No callback example
$("button").click(function(){
$("p").hide(1000);
alert("The paragraph is now hidden");
});
$("button").click(function(){
$("p").hide("slow",function(){
alert("The paragraph is now hidden");
});
});
$ curl https://raw.githubusercontent.com/creationix/nvm/v0.23.2/install.sh | bash
$ nvm install 0.10
$ nvm use 0.10
$ nvm alias default 0.10
@jeanlucaslima
jeanlucaslima / .zshrc
Created March 13, 2015 13:01
My .zshrc
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="ys"
# Uncomment the following line to use case-sensitive completion.
@jeanlucaslima
jeanlucaslima / gist:63d76aadf209be747135
Created March 21, 2015 03:20
MySQL date to JavaScript
// Divide a string em [ Y, M, D, h, m, s ]
var t = "2015-03-21 03:12:01".split(/[- :]/);
// Aplica os itens em uma nova variável, já no padrão de data JavaScript
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
@jeanlucaslima
jeanlucaslima / media.c
Created March 25, 2015 01:36
Maior, menor, média em C
#include <stdio.h>
// Declarando a biblioteca que especifica as funcoes printf() e scanf()
int main() {
int i;
int maior, menor, entrada;
float media;
scanf(" %d", &entrada);
// o espaço antes eh para evitar que leia lixo do buffer
@jeanlucaslima
jeanlucaslima / main.c
Created May 14, 2015 20:13
ascii letters counter
#include <stdio.h>
int main(void) {
char c = NULL;
int letters = 0, numbers = 0;
while(c != '\n') {
scanf("%c", &c);
if (c > 47 && c < 58) // if it's a number
numbers++;
@jeanlucaslima
jeanlucaslima / intructions.md
Created December 26, 2015 17:14
Installing Steam Ubuntu 14.04.03 64 bits dell laptop
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates && sudo apt-get update && sudo apt-get dist-upgrade # install intel graphics updates
sudo apt-get install libc6:i386 libgl1-mesa-dri-lts-vivid:i386 libgl1-mesa-glx-lts-vivid:i386 
sudo apt-get install compizconfig-settings-manager 
  1. Launch CompizConfig Settings Manager from the Dash menu.
  2. Go to composite
  3. Uncheck Unredirect Fullscreen Windows
Verifying that +jeanlucas is my blockchain ID. https://onename.com/jeanlucas