Skip to content

Instantly share code, notes, and snippets.

@nowl
nowl / perlin.c
Created February 15, 2011 19:04
Perlin Noise in C
#include <stdio.h>
static int SEED = 0;
static int hash[] = {208,34,231,213,32,248,233,56,161,78,24,140,71,48,140,254,245,255,247,247,40,
185,248,251,245,28,124,204,204,76,36,1,107,28,234,163,202,224,245,128,167,204,
9,92,217,54,239,174,173,102,193,189,190,121,100,108,167,44,43,77,180,204,8,81,
70,223,11,38,24,254,210,210,177,32,81,195,243,125,8,169,112,32,97,53,195,13,
203,9,47,104,125,117,114,124,165,203,181,235,193,206,70,180,174,0,167,181,41,
164,30,116,127,198,245,146,87,224,149,206,57,4,192,210,65,210,129,240,178,105,
@fnando
fnando / dev.conf
Created July 23, 2011 09:00
Nginx configuration for SSH tunnel
upstream tunnel {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name dev.codeplane.com br.dev.codeplane.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
@dylancwood
dylancwood / tree.css
Last active April 29, 2024 15:48
CSS to create a simple tree structure with connecting lines. No images or JS required.
ul.tree, ul.tree ul {
list-style: none;
margin: 0;
padding: 0;
}
ul.tree ul {
margin-left: 10px;
}
ul.tree li {
margin: 0;
@mariobadr
mariobadr / game_loop.cpp
Last active March 5, 2024 22:20
A basic game loop using std::chrono
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Mario Badr
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@heatray
heatray / w4arguments.md
Last active November 3, 2019 15:22
Worms 4 Mayhem Command line arguments

GAME SETTINGS

/CONFIG:%FILE%          загрузка настроек из файла
/W:%NUM%                ширина экрана
/H:%NUM%                высота экрана
/FS                     игра в полный экран
/WIN                    игра в окне
/REFRESH:%NUM%          частота или фпс в игре
/INVERTMOUSEFP          инверт мышки от первого лица [Mouse Y-axis inverted for first person]
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
anonymous
anonymous / access.txt
Created July 13, 2017 15:16
username
password
@passcod
passcod / __why-and-how-to-use.md
Last active March 22, 2023 13:33
Bootstrap 4 mixins for spacing utilities without classes

Why?

This:

.action {
  @extend .ml-3;
}
@Drovolon
Drovolon / 1.14.x-chunk-loading-final.md
Created August 11, 2019 14:36
An overview of chunk loading mechanics in Minecraft 1.14, tested empirically in 1.14.4.

1.14.x Chunk Loading

Chunk loading operates differently in 1.14 than in previous Minecraft versions. This document is intended to be an overview of the 1.14 system.

In 1.14, chunk loading starts with tickets. A ticket is:

  • a ticket type
  • a load level
  • optionally, a time-to-live