Skip to content

Instantly share code, notes, and snippets.

View Softwave's full-sized avatar

Softwave Softwave

View GitHub Profile
@Softwave
Softwave / IslandCreator.gd
Last active October 20, 2023 07:54
TerrainCreator
# IslandCreator: A tool for generating island terrain meshes
# procedurally with Simplex Noise
@tool
extends Node3D
# Globals
var _noise = FastNoiseLite.new()
@export var groundMaterial: Material
@Softwave
Softwave / README.md
Last active May 3, 2024 21:22
Fibonacci Program

Fib

Simple fibonacci number calculator.

Usage: fib nth Fibonacci number

// ==UserScript==
// @name Hide Twitter Trending
// @version 1
// @description Hides the "What's happening" sidebar on Twitter
// @run-at document-idle
// ==/UserScript==
// Greasemonkey script to hide the twitter trending page
#!/usr/bin/python
import sys
from PyQt5.QtWidgets import QApplication, QDialog, QVBoxLayout, QDateEdit, QPushButton, QLabel
from PyQt5.QtCore import QDate
from PyQt5 import uic
# A tiny program to compare two dates and get the difference in days
class DateCompare(QDialog):
@Softwave
Softwave / fib.c
Last active February 23, 2023 18:43
/*
Calculate the nth Fibonacci number.
example usage: ./fib 50
(Calculates the 50th fibonacci number)
(Do what you want with this)
https://opensource.org/license/0bsd/
Zero-Clause BSD
===============
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform int iterations;
uniform float zoom = 0.1;
uniform float zoomPos1 = 0.755;
uniform float speedMod = 0.3;
@Softwave
Softwave / .emacs
Created October 29, 2016 02:55 — forked from ftrain/.emacs
a nice .emacs for when you are on a terminal. Respects scroll wheel events. Very useful when run inside of tmux and combined with this tmuxconf: https://gist.github.com/ftrain/8443744
;; .emacs
;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)
;; enable visual feedback on selections
(setq transient-mark-mode t)
;; default to better frame titles
(setq frame-title-format
@Softwave
Softwave / plotting.py
Created October 5, 2016 04:06
plotting.py
# program that graphs tribble population growth
from pylab import *
import math
def p(t):
return math.e ** (0.2 * t)
@Softwave
Softwave / How to connect a PS3 controller.md
Created June 21, 2016 05:11 — forked from hlung/How to connect a PS3 controller.md
How to connect PS3 controller on Mac OSX, PC

How to connect PS3 controller on Mac OSX, PC, etc.

This is how you connect PS3 controller to Mac OSX, PC, etc. when previously connected to a PS3. You will need a Mini USB cable. Overcome your laziness, get up of your chair, and go get one!

A big misconception is that keep holding PS button will reset the controller's pairing. It DOES NOT! From my testings, the controller keeps paring with the last machine it was CONNECTED VIA A USB CABLE.

Here are the steps:

@Softwave
Softwave / ui.py
Created March 15, 2016 20:52
ui.py
from _ui import *
import _ui
import re
import json
import inspect
import sys
import os
def in_background(fn):
import functools