This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <X11/X.h> | |
#include <X11/Xlib.h> | |
#include <GL/gl.h> | |
#include <GL/glx.h> | |
void desenhaMinhaCena() | |
{ | |
glClearColor(1, 1, 1, 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for dir in $(find . -name '.git' -type d) | |
do | |
dir=$(dirname $dir) | |
cd $dir | |
STATE="" | |
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let baixarEl = document.querySelector('#baixar'); | |
let avatarEl = document.querySelector('#avatar-preview'); | |
baixarEl.addEventListener('click', function(e) { | |
html2canvas(avatarEl, { | |
onrendered: function(canvas) { | |
let contextoGrafico = canvas.getContext('2d'); | |
contextoGrafico.webkitImageSmoothingEnabled = false; | |
contextoGrafico.mozImageSmoothingEnabled = false; | |
contextoGrafico.imageSmoothingEnabled = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.co checkout | |
git config --global alias.cob "checkout -b" | |
git config --global alias.st status | |
git config --global alias.coolio "checkout -- *" | |
git config --global --add alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit --all" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Attempt MySQL server connection. Assuming you are running MySQL | |
server with default setting (user 'root' with no password) */ | |
$link = mysqli_connect("localhost", "root", "", "demo"); | |
// Check connection | |
if($link === false){ | |
die("ERROR: Could not connect. " . mysqli_connect_error()); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <GL/gl.h> | |
char *className = "OpenGL"; | |
char *windowName = "Hello World"; | |
int winX = 0, winY = 0; | |
int winWidth = 500, winHeight = 500; | |
HDC hDC; | |
HGLRC hGLRC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <GL/freeglut.h> | |
void desenhaMinhaCena(void) | |
{ | |
glClearColor(1, 1, 1, 1); | |
glClear(GL_COLOR_BUFFER_BIT); | |
glBegin(GL_TRIANGLE_FAN); | |
glVertex3f(-0.5, -0.5, 0.0); | |
glVertex3f( 0.5, -0.5, 0.0); | |
glVertex3f( 0.5, 0.5, 0.0); |