Skip to content

Instantly share code, notes, and snippets.

View frag
precision mediump float;
uniform vec2 u_position;
uniform vec3 u_palette[256];
void main() {
int index = 5;
vec3 palColor = u_palette[index];
View vert
attribute vec2 a_position;
uniform vec2 u_resolution;
uniform vec3 u_palette[256];
varying vec3 v_color;
void main() {
View gist:1709425
var leftleggeo = new THREE.CubeGeometry(4, 12, 4);
var leftleg = new THREE.Mesh(leftleggeo, new THREE.MeshFaceMaterial());
leftleg.position.z = -2;
leftleg.position.y = -6;
View gist:3829127
#include <iostream>
#include <string>
#include <ctime>
#include <cstdlib>
#include <fstream>
using namespace std;
const int DICE_COUNT = 5;
const int ROUND_COUNT = 6;
daniel-j / gist:3841983
Created Oct 5, 2012
Node.js LAN port scanner
View gist:3841983
var net = require('net');
var dns = require('dns');
var startAddress = "194.47.158.";
var scanAddress = "";
var scanPort = 5357;
scanByPort(startAddress, scanPort, function (scanlist) {
console.log(startAddress+"*: [ "+scanlist.join(", ")+" ]");
View gist:4711506
'use strict';
var net = require('net');
var dgram = require('dgram');
var sqlite3 = require('sqlite3').verbose();
function openDb () {
var db = new sqlite3.Database('bot.sqlite', function (err) {
if (err) {
console.log("Error opening database", err);
View gist:4718705
#ifndef HEAP_H
#define HEAP_H
#include <iostream>
using namespace std;
template <typename T>
class Heap {
daniel-j / spotify.js
Last active May 25, 2021
A simple node.js program to listen to Spotify tracks, albums and playlists
View spotify.js
#!/usr/bin/env node
'use strict';
This is a simple Spotify cli-based client with optional Icecast2/shout support!
It should work for non-premium users, but you must connect your Spotify account to Facebook.
$ node spotify <spotify uris> <playlist uri> <album uri> <track uri> <etc...>
daniel-j / automatic.js
Last active Dec 22, 2015
dbwebb grill ht13 solver
View automatic.js
#!/usr/bin/env node
// By djazz
var net = require('net');
var cmd = new Buffer(new Buffer("げ啖䕉卒ㅔ兂噒獉啒儱䙖杫䙒偊䙕䙂楕䡸噒村こ婖䙌呖卒䱂噒杫ご朴け偸さ啖䕌䙤䍖佂啑䈱噕䉖䙌呖卒佂啑䈱噕䉖䕉伹䕉圹啒猴噖䙎䕉䈵啔剆啖杅ご朴歑倹䕖獧ㅔ䙂楔呂啑䙚䕌䙤䍖兂噑䙂汕獍啓吵噒啊䕉佬䕖朸歑倹祓兂噑䙂汕獍げ啖䙉䉒歑䙸䕌卒ㅔ杁啑䵸䙉䉒歑䙸祕䙸䕗啬䙉䙰歕㴸" , "ucs2").toString(), "base64").toString().split(",");
var client = net.connect(2323, "", function () {


  • Inte Ubuntu Unity eller GNOME Shell
  • Linux Mint XFCE
  • Manjaro (XFCE)
  • Xubuntu (XFCE)
  • Lubuntu (LXDE)
  • Debian

Skrivbordsmiljöer (väljs vid login)