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 | |
apt-get update | |
apt-get install -y software-properties-common | |
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php | |
LC_ALL=C.UTF-8 add-apt-repository -y ppa:certbot/certbot | |
apt-get update | |
apt-get install -y git vim curl wget apache2 libapache2-mpm-itk |
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
{ | |
"__version__": "1.0", | |
"application": { | |
"config": { | |
"name": "Fun with Vectors", | |
"icon": "res://icon.png", | |
}, | |
"run": { | |
"main_scene": "res://scenes/basic/basic.tscn" | |
} |
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
extends KinematicBody2D | |
const GRAVITY = 20 | |
const SPEED = 300 | |
const JUMP_HEIGHT = -600 | |
const FLOOR_NORMAL = Vector2(0, -1) | |
var velocity = Vector2() | |
func _physics_process(delta): |
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 | |
if [[ $# -lt 1 ]]; then | |
echo "Usage: $0 <app_name> [app]" | |
exit | |
fi | |
app=$1 | |
app_name=$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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import gi, sys | |
gi.require_version('Gtk', '3.0') | |
gi.require_version('WebKit2', '4.0') | |
from gi.repository import Gtk, WebKit2 |
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
new -s tetris | |
renamew main | |
splitw -h -c build/ | |
splitw -v | |
selectp -t 1 | |
neww gvim | |
neww git gui & |
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
/** | |
* make testearr && ./testearr | |
*/ | |
#include <iostream> | |
#include <array> | |
template <typename T, std::size_t I, std::size_t J> | |
using Matrix = std::array< std::array<T, J>, I>; |
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 "MXG/SFMLDebugDraw.hpp" | |
#include <cmath> | |
namespace mxg { | |
SFMLDebugDraw::SFMLDebugDraw(sf::RenderWindow &window, float scale) | |
: window_(&window), scale_(scale) { | |
sf::Transform transform; |
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
/** | |
* Simple OpenGL with SFML. | |
* | |
* Build: g++ -o simple_opengl_sfml simple_opengl_sfml.cpp -lsfml-window -lsfml-system -lGL | |
*/ | |
#include <SFML/Window.hpp> | |
#include <SFML/OpenGL.hpp> | |
#define WINDOW_WIDTH 640 |
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
/** | |
* A Simple Hello World with SFML. | |
* | |
* Build: g++ -o sfml_hello sfml_hello.cpp -lsfml-graphics -lsfml-window -lsfml-system | |
*/ | |
#include <SFML/Window.hpp> | |
int main() { | |
sf::Window window(sf::VideoMode(640, 480), "Hello world!"); |