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
#!/usr/bin/env bash | |
# As in: http://stackoverflow.com/a/41289659/7331008 | |
# Exiting on errors | |
set -e | |
# Set required version | |
VERSION="4.2.0" |
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 <SDL2/SDL.h> | |
int main() { | |
SDL_Init(SDL_INIT_EVERYTHING); | |
SDL_Window *window = SDL_CreateWindow("Drag-and-Drop", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 800, 600, SDL_WINDOW_SHOWN); | |
int running = 1; | |
while (running) { | |
SDL_Event event; | |
while (SDL_PollEvent(&event)) { |
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
public static function unzip( _path:String, _dest:String, ignoreRootFolder:String = "" ) { | |
var _in_file = sys.io.File.read( _path ); | |
var _entries = haxe.zip.Reader.readZip( _in_file ); | |
_in_file.close(); | |
for(_entry in _entries) { | |
var fileName = _entry.fileName; |
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
(´・ω・`) | |
(˘❥˘) | |
(・ิω・ิ) | |
(。▰‿‿▰。) ❤ | |
( ・ิω・ิ)ノิ | |
Z(∩3∩)Z | |
o( ̄ヘ ̄o#). | |
╰(*°▽°*)╯ | |
ʅ(‾◡◝)ʃ | |
ʕ •ᴥ•ʔ |
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
// windowHandle is a pointer to an SDL_Window object, acquired and stored from your original call to SDL_CreateWindow | |
SDL_DestroyWindow(windowHandle); | |
// You'll probably want to keep the window title and window position unchanged | |
// by caching those values before you destroy the previous window. | |
windowHandle = SDL_CreateWindow("Window Title", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, newWidth, newHeight, SDL_WINDOW_OPENGL); | |
// windowContext is an SDL_GLContext object, acquired and stored from your initial SDL_GL_CreateContext call. | |
SDL_GL_MakeCurrent(windowHandle, windowContext); | |
// Again, keeping in mind that resolution and window size are separate things -- |
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
import haxe.macro.Context; | |
import haxe.macro.Expr; | |
import haxe.macro.Type; | |
using Lambda; | |
/** | |
Old school abstract class. | |
Classes that implements it, and their sub-classes, will be able to declare abstract methods (methods that without body). | |
There will be a check in compile-time such that no public constructor is allowed without all abstract methods implemented. | |
*/ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
http://www.springframework.org/schema/tx | |
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd | |
http://www.springframework.org/schema/aop | |
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd | |
http://www.springframework.org/schema/util |
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
#!/usr/bin/env ruby | |
require "webrick" | |
=begin | |
WEBrick is a Ruby library that makes it easy to build an HTTP server with Ruby. | |
It comes with most installations of Ruby by default (it’s part of the standard library), | |
so you can usually create a basic web/HTTP server with only several lines of code. | |
The following code creates a generic WEBrick server on the local machine on port 1234, |
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
Gem::Specification.new do |s| | |
s.name = 'bang' | |
s.version = '0.1.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'Jeff Kreeftmeijer' | |
s.email = '[email protected]' | |
s.summary = 'Bang!' | |
s.description = 'Bangs existing model methods' | |
s.files = ['bang.rb'] |
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 <lua.h> | |
#include <lauxlib.h> | |
#include <lualib.h> | |
#include <stdlib.h> | |
int map_create(lua_State *lua); | |
int map_slice(lua_State *lua); | |
int main(int argc, char **argv){ | |
lua_State *lua = lua_open(); |
NewerOlder