Skip to content

Instantly share code, notes, and snippets.

local tile = require("tile")
local board = {}
function board:new()
o = o or {}
setmetatable(o, self)
self.__index = self
o.tiles = {}
@jacobmischka
jacobmischka / ds4led
Created December 30, 2015 04:20
Changes color for ds4 controller lightbar on linux and gives permissions so games can change it too if they support it.
#!/bin/bash
# This isn't really that safe to blindly run,
# as it uses sudo to change system file permissions.
# Hopefully it shouldn't break anything though.
# Usage: ds4led [r value] [g value] [b value]
# or `ds4led orange` to set it to orange.
DS4="0003:054C:05C4.*"
cd /sys/class/leds
[mischka@mischka-work browser-laptop-0.7.12dev]$ npm run build-package
> [email protected] build-package /home/mischka/Downloads/browser-laptop-0.7.12dev
> node ./tools/buildPackage.js
Building version 0.7.12 in Brave-linux-x64 with Electron 0.36.7
echo cleaning up target...&&rm -rf Brave-linux-x64&&rm -f dist/*.dmg dist/*.nupkg dist/*.exe dist/*.msi dist/RELEASES dist/*.zip&&echo done&&echo starting build...&&"./node_modules/.bin/webpack"&&npm run checks&&node ./node_modules/electron-packager/cli.js . Brave --overwrite --ignore="test/|tools/|abp-filter-parser-cpp/(node_modules|test|perf|sample|scripts|test|vendor|ABPFilterParserData.dat)|tracking-protection/(node_modules|test|data|scripts|vendor)|sqlite3/(src|deps)|sqlite3/build/Release/(obj|obj.target|.deps)|abp-filter-parser-cpp/build/Release/(obj|obj.target|.deps)|tracking-protection/build/Release/(obj|obj.target|.deps)|nsp/node_modules|electron-installer-squirrel-windows|electron-chromedriver|node-notifier/vendor|node-gyp|.brave-gyp|electron-download|electr
@jacobmischka
jacobmischka / php-fpm.conf
Created February 17, 2016 17:24
PHP-FPM and Caddy
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr). This prefix can be dynamically changed by using the
; '-p' argument from the command line.
;;;;;;;;;;;;;;;;;;
; Global Options ;
@jacobmischka
jacobmischka / gist:0bd07fc66bfded7cd1e2
Created February 22, 2016 15:06
git-lfs bootstrap output
[mischka@mischka-work git-lfs-1.1.1]$ ./script/bootstrap
package main
imports github.com/github/git-lfs/lfs
imports github.com/github/git-lfs/vendor/_nuts/github.com/ThomsonReutersEikon/go-ntlm/ntlm: must be imported as _nuts/github.com/ThomsonReutersEikon/go-ntlm/ntlm
package main
imports github.com/github/git-lfs/lfs
imports github.com/github/git-lfs/vendor/_nuts/github.com/ThomsonReutersEikon/go-ntlm/ntlm
imports github.com/github/git-lfs/vendor/_nuts/github.com/ThomsonReutersEikon/go-ntlm/ntlm/md4: must be imported as _nuts/github.com/ThomsonReutersEikon/go-ntlm/ntlm/md4
package main
imports github.com/github/git-lfs/lfs
[mischka@mischka-work dokuwiki]$ pwd
/home/mischka/dokuwiki
[mischka@mischka-work dokuwiki]$ ls -ld /home
drwxr-xr-x 3 root root 4096 Jul 13 2015 /home
[mischka@mischka-work dokuwiki]$ ls -ld /home/mischka
drwxr-xr-x 63 mischka mischka 4096 Feb 23 08:47 /home/mischka
[mischka@mischka-work dokuwiki]$ ls -ld /home/mischka/dokuwiki/
drwxr-xr-x 8 mischka mischka 4096 Feb 17 13:21 /home/mischka/dokuwiki/
[mischka@mischka-work dokuwiki]$ >error.log
[mischka@mischka-work dokuwiki]$ caddy
[mischka@mischka-work ~]$ sudo mv dokuwiki/ /srv/http/
[mischka@mischka-work srv]$ cd /
[mischka@mischka-work /]$ ls -ld /srv
drwxr-xr-x 4 root root 4096 Feb 15 2015 /srv
[mischka@mischka-work /]$ ls -ld /srv/http/
drwxr-xr-x 3 root root 4096 Feb 23 08:57 /srv/http/
[mischka@mischka-work /]$ ls -ld /srv/http/dokuwiki/
drwxr-xr-x 8 mischka mischka 4096 Feb 17 13:21 /srv/http/dokuwiki/
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<style>
img {
width: 100%;
}
</style>
</head>
<body>
@jacobmischka
jacobmischka / index.html
Created March 16, 2016 01:31
index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Homepage</title>
<link href="styles.css" rel="stylesheet" type="text/css">
<!--The following script tag downloads a font from the Adobe Edge Web Fonts server for use within the web page. We recommend that you do not modify it.-->
<script>
@jacobmischka
jacobmischka / styles.css
Created March 16, 2016 01:33
styles.css
@charset "utf-8";
body {
font-size: 2em;
font-family: chunk;
font-style: normal;
font-weight: 400;
}
.container {