Skip to content

Instantly share code, notes, and snippets.

View 0xlitf's full-sized avatar

0xCalcifer 0xlitf

  • 18:12 (UTC +08:00)
View GitHub Profile
@kymckay
kymckay / perlin.lua
Last active March 11, 2024 22:51
Perlin Noise in Lua
--[[
Implemented as described here:
http://flafla2.github.io/2014/08/09/perlinnoise.html
]]--
perlin = {}
perlin.p = {}
-- Hash lookup table as defined by Ken Perlin
-- This is a randomly arranged array of all numbers from 0-255 inclusive
@Flafla2
Flafla2 / Perlin_Tiled.cs
Last active June 20, 2024 04:38
A slightly modified implementation of Ken Perlin's improved noise that allows for tiling the noise arbitrarily.
public class Perlin {
public int repeat;
public Perlin(int repeat = -1) {
this.repeat = repeat;
}
public double OctavePerlin(double x, double y, double z, int octaves, double persistence) {
double total = 0;
@polovik
polovik / logging_Qt.cpp
Last active July 20, 2023 11:52
Log to file or log to output panel in QtCreator for Qt
#include <QtDebug>
#include <QTranslator>
#include <QTextCodec>
#include <QLocale>
#include <QTime>
#include <QDir>
static QTextCodec *logCodec = NULL;
static FILE *logStream = NULL;
QString g_logFilePath = "";
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@elpuri
elpuri / gist:3753756
Created September 20, 2012 03:12
A collapsible nested list example in QML
import QtQuick 1.1
Item {
width: 200
height: 300
ListView {
anchors.fill: parent
model: nestedModel
delegate: categoryDelegate
@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark