Skip to content

Instantly share code, notes, and snippets.

In /etc/autofs.conf
Change around line 38:
#browse_mode = no
browse_mode = yes
Create /etc/auto.map
nfsexample -rw,soft,intr,rsize=8192,wsize=8192 nfs.server.lan:/nfsshare
oldsmb -fstype=cifs,sec=ntlm,rw,credentials=/etc/creds/old.smb.password,file_mode=0777,dir_mode=0777,noperm ://oldsmb.server.lan/sharename
using System;
public abstract class FractalNoise
{
public abstract long GetSeed();
public abstract double Eval(double x);
public abstract double Eval(double x, double y);
/*
LoRa Duplex communication
Sends a message every half second, and polls continually
for new incoming messages. Implements a one-byte addressing scheme,
with 0xFF as the broadcast address.
Uses readString() from Stream class to read payload. The Stream class'
timeout may affect other functuons, like the radio's callback. For an
@opless
opless / virt-backup.pl
Created March 30, 2017 00:04 — forked from trick77/virt-backup.pl
virt-backup.pl: fixed paths so live images will work again in Ubuntu 14.04
#!/usr/bin/perl -w
#
# 1. Install required dependencies:
# sudo apt-get install -y libxml-simple-perl pv libsys-virt-perl
# 2. Run it like this (assuming the LVM disk size is 20G):
# /virt-backup.pl --vm mykvm --state --snapsize=20G --backupdir /tmp --debug --compress
#
# AUTHOR
# Daniel Berteaud <daniel@firewall-services.com>
#
#!/usr/bin/perl -w
use IO::Socket ;
use IO::Handle ;
my $host = $ARGV[0] || "localhost";
my $port = $ARGV[1] || 8000;
STDERR->autoflush(1);
STDOUT->autoflush(1);
my $data = "";
@opless
opless / keybase.md
Created December 31, 2016 20:04
keybase.md

Keybase proof

I hereby claim:

  • I am opless on github.
  • I am opless (https://keybase.io/opless) on keybase.
  • I have a public key ASASBUhnQojSP4VCofvPfN2p4xVo5Wt-gLBUUJqMrBSJAwo

To claim this, I am signing this object:

// Planet Shadertoy. Created by Reinder Nijhoff 2015
// @reindernijhoff
//
// https://www.shadertoy.com/view/4tjGRh
//
//#define HIGH_QUALITY
//#define MED_QUALITY
//#define LOW_QUALITY
#define VERY_LOW_QUALITY
#!/bin/bash
#NB. only tested on UE 4.9 series.
#change these as appropriate.
export PROJECT_DIR=/path/to/your/project
export ACTION=
export PLATFORM_NAME=macosx
export CONFIGURATION=DebugGame
#probably could use a bit of tidying up
@opless
opless / gist:dce9b6a6343fcbd30db8
Created April 9, 2015 06:48
ImageEffectBase.cs
using UnityEngine;
[RequireComponent (typeof(Camera))]
[AddComponentMenu("")]
public class ImageEffectBase : MonoBehaviour
{
/// Provides a shader property that is set in the inspector
/// and a material instantiated from the shader
public Shader shader;
private Material m_Material;
# rename origin remote
git remote rename origin github
# add the gitlab remote (for the love of everything that’s holy, use ssh)
git remote add bitbucket <remote link for bitbucket>
# push existing code to new remote
git push -u bitbucket —all
# let’s magic