Skip to content

Instantly share code, notes, and snippets.

View matjam's full-sized avatar

Nathan Ollerenshaw matjam

View GitHub Profile
20:36:45 [SEVERE] Could not load plugins/Permissions.jar in plugins: null
org.bukkit.plugin.InvalidPluginException
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:113)
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
-rw-r--r-- 1 chrome chrome 7.1K 2011-03-10 22:30 chatbukkit.jar
drwxr-xr-x 2 chrome chrome 4.0K 2011-03-12 16:05 CraftBook
drwxr-xr-x 2 chrome chrome 4.0K 2011-03-12 16:05 CraftBookCircuits
-rw-r--r-- 1 chrome chrome 6.7K 2011-03-12 16:05 CraftBookCircuits.jar
-rw-r--r-- 1 chrome chrome 26K 2011-03-12 16:05 CraftBook.jar
drwxr-xr-x 2 chrome chrome 4.0K 2011-03-12 16:05 CraftBookMechanisms
-rw-r--r-- 1 chrome chrome 140K 2011-03-12 16:05 CraftBookMechanisms.jar
drwxr-xr-x 2 chrome chrome 4.0K 2011-03-12 16:05 CraftBookVehicles
-rw-r--r-- 1 chrome chrome 5.4K 2011-03-12 16:05 CraftBookVehicles.jar
drwxr-xr-x 4 chrome chrome 4.0K 2011-03-17 18:50 Essentials
@matjam
matjam / model.go
Created October 8, 2019 19:13
Example GORM model
package model
import (
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/mysql"
)
// this is shared by all goroutines accessing the database. Note it is NOT
// exported as any database access code should be in this package. This creates
// clean separation of concerns.
#include <random>
#include <iostream>
#define BUCKETS 100
#define ITERATIONS 100000
int main()
{
uint64_t buckets[BUCKETS] = {0};
std::mt19937_64 rand(1);
# CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
# install vcpkg into /usr/local/vcpkg or some other path; you just need to point to it.
# hardcode the path in the CMakeLists.txt because I'm a peasant.
set(CMAKE_TOOLCHAIN_FILE "/usr/local/vcpkg/scripts/buildsystems/vcpkg.cmake")
project(testapp
VERSION 0.1
DESCRIPTION "test"
const std = @import("std");
const c = @import("c.zig");
const vertexShaderSource =
\\#version 330 core
\\layout (location = 0) in vec3 aPos;
\\void main()
\\{
\\ gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);
\\}
fn compileShader(file: var, shader_type: c_uint) !c.GLuint {
std.debug.warn("shader loading file: {}\n", .{file});
const source = try std.fs.cwd().readFileAlloc(std.heap.c_allocator, file, 1000000);
defer std.heap.c_allocator.free(source);
var shader = c.glCreateShader(shader_type);
c.glShaderSource(shader, 1, &(&source[0]), null);
c.glCompileShader(shader);
// check for shader compile errors
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"${vcpkgRoot}/x64-windows/include",
"${vcpkgRoot}/x64-windows-static/include",
"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/include"
],
inline bool
glyphBit(const FT_GlyphSlot &glyph, const int x, const int y)
{
int pitch = abs(glyph->bitmap.pitch);
unsigned char *row = &glyph->bitmap.buffer[pitch * y];
char cValue = row[x >> 3];
return (cValue & (128 >> (x & 7))) != 0;
}
struct Quad {
sf::Vertex &a;
sf::Vertex &b;
sf::Vertex &c;
sf::Vertex &d;
};
inline Quad &
getQuadForScreenLocation(sf::Vector2i location)
{