Skip to content

Instantly share code, notes, and snippets.

View sustained's full-sized avatar
😓
working on website remake in Saber and exploring generative art and fractals

sustained sustained

😓
working on website remake in Saber and exploring generative art and fractals
View GitHub Profile
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/strongly-recommended',
'plugin:vue/recommended',
'plugin:vue/essential',
'@vue/airbnb',
@munificent
munificent / generate.c
Last active March 18, 2024 08:31
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@alexlee-gk
alexlee-gk / configure_cuda_p70.md
Last active March 19, 2024 17:47
Use integrated graphics for display and NVIDIA GPU for CUDA on Ubuntu 14.04

This was tested on a ThinkPad P70 laptop with an Intel integrated graphics and an NVIDIA GPU:

lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation Device 191b (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204GLM [Quadro M3000M] (rev a1)

A reason to use the integrated graphics for display is if installing the NVIDIA drivers causes the display to stop working properly. In my case, Ubuntu would get stuck in a login loop after installing the NVIDIA drivers. This happened regardless if I installed the drivers from the "Additional Drivers" tab in "System Settings" or the ppa:graphics-drivers/ppa in the command-line.

@gkhays
gkhays / DrawSineWave.html
Last active March 9, 2024 19:05
Oscillating sine wave, including the steps to figuring out how to plot a sine wave
<!DOCTYPE html>
<html>
<head>
<title>Sine Wave</title>
<script type="text/javascript">
function showAxes(ctx,axes) {
var width = ctx.canvas.width;
var height = ctx.canvas.height;
var xMin = 0;
@parmentf
parmentf / GitCommitEmoji.md
Last active April 23, 2024 10:28
Git Commit message Emoji
@cakenggt
cakenggt / scraper.js
Last active November 28, 2015 15:41
Duolingo Vocab Scraper
var skillList = [];
var learningLanguage = duo.user.attributes.learning_language
var skills = duo.user.attributes.language_data[learningLanguage].skills.models;
skills.sort(function(a, b){
if (a.attributes.coords_y == b.attributes.coords_y){
return a.attributes.coords_x-b.attributes.coords_x;
}
else{
return a.attributes.coords_y-b.attributes.coords_y;
}
@MoOx
MoOx / index.js
Last active February 9, 2024 22:44
Export/import github labels
// go on you labels pages
// eg https://github.com/cssnext/cssnext/labels
// paste this script in your console
// copy the output and now you can import it using https://github.com/popomore/github-labels !
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),
@sustained
sustained / wordlist
Last active August 29, 2015 14:19 — forked from pushmatrix/wordlist
man
kvinna
är
pojke
flicka
jag
en
han
hon
ett