This file contains hidden or 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
| @Override | |
| public void draw() { | |
| this.sprite.getTexture().bind(); | |
| //double w = this.width/32; | |
| //double h = this.height/32; // we should do the same for height. | |
| double row = this.sprite.getsY(); | |
| double col = this.sprite.getsX(); | |
This file contains hidden or 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
| # Contributor: Austin ( doorknob60 [at] gmail [dot] com ) | |
| # Maintainer: Gaetan Bisson <bisson@archlinux.org> | |
| pkgname=broadcom-wl | |
| pkgver=5.100.82.112 | |
| pkgrel=3 | |
| pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver' | |
| url='http://www.broadcom.com/support/802.11/linux_sta.php' | |
| arch=('i686' 'x86_64') | |
| license=('custom') |
This file contains hidden or 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
| package main | |
| // NOTE: This implements the following protocol: | |
| // https://github.com/turn/json-over-tcp | |
| // This was done for chunking reasons | |
| // Darn you TCP! | |
| import ( | |
| "encoding/binary" | |
| "encoding/json" |
This file contains hidden or 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
| // Any colors for output | |
| var colors = require('colors'); | |
| // For json sockets | |
| var jot = require('json-over-tcp'); | |
| // Setup socket.io | |
| var app = require('http').createServer(); | |
| var io = require('socket.io').listen(app); |
This file contains hidden or 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
| import requests | |
| import gspread | |
| gc = gspread.login('user@gmail.com', 'password') | |
| wks = gc.open('Reddit Analysis Data').sheet1 | |
| # Grab the hot topics | |
| r = requests.get("http://www.reddit.com/hot.json?limit=50") | |
| j = r.json() | |
| cols = ['title', 'author', 'over_18', 'url', 'permalink', 'created_utc', 'subreddit', 'num_comments', 'ups', 'downs', 'score'] |
This file contains hidden or 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
| import java.awt.Graphics; | |
| import java.awt.image.BufferedImage; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import javax.imageio.ImageIO; | |
| import org.apache.commons.cli.BasicParser; | |
| import org.apache.commons.cli.CommandLine; | |
| import org.apache.commons.cli.HelpFormatter; |
This file contains hidden or 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
| import json | |
| import struct | |
| import socket | |
| # Minecraft varints are 32-bit signed values | |
| # packed into Google Protobuf varints | |
| # https://gist.github.com/nickelpro/7312782 | |
| import struct | |
| def pack_varint(val): |
This file contains hidden or 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 | |
| // Settings | |
| $hostname = "66.240.202.11"; | |
| $port = 25565; | |
| // Based off of https://github.com/winny-/mcstat/blob/master/mcstat.php | |
| // with updated reading of the key-value and username portions. | |
| $sess_id = rand(1, 0xFFFFFFFF) & 0x0F0F0F0F; |
This file contains hidden or 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
| [submodule "mcstat"] | |
| path = mcstat | |
| url = https://github.com/winny-/mcstat.git |
This file contains hidden or 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
| // NOTE: _GNU_SOURCE is required for this to work because of asprintf | |
| #define _GNU_SOURCE | |
| #include <stdarg.h> | |
| #include <stdio.h> | |
| // This function allocates a string, prints the formatted version to it and uses write to print it to stdout. | |
| void waprintf(const char *fmt, ...) { | |
| va_list args; |
OlderNewer