Skip to content

Instantly share code, notes, and snippets.

@robwiss
robwiss / particulate.py
Created June 30, 2022 14:45
enviro+ pms5003 logging code
import time
from pms5003 import PMS5003
import argparse
import csv
from bme280 import BME280
try:
from smbus2 import SMBus
except ImportError:
@robwiss
robwiss / crash.log
Created September 17, 2018 20:43
vsphere_virtual_machine_snapshot bug
2018/09/17 16:20:13 [INFO] Terraform version: 0.11.8 7a5c1d221ac209bbac66947c369815cd9ca70ed5
2018/09/17 16:20:13 [INFO] Go runtime version: go1.10.1
2018/09/17 16:20:13 [INFO] CLI args: []string{"/home/rob/bin/terraform", "apply"}
2018/09/17 16:20:13 [DEBUG] Attempting to open CLI config file: /home/rob/.terraformrc
2018/09/17 16:20:13 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/09/17 16:20:13 [INFO] CLI command args: []string{"apply"}
2018/09/17 16:20:13 [INFO] command: empty terraform config, returning nil
2018/09/17 16:20:13 [DEBUG] command: no data state file found for backend config
2018/09/17 16:20:13 [DEBUG] New state was assigned lineage "d763c208-ea2b-fe31-03b2-3e5001667c4a"
2018/09/17 16:20:13 [INFO] command: backend initialized: <nil>
@robwiss
robwiss / tmdb_poster_get.py
Created December 3, 2017 16:39
get movie posters from themoviedb.com for mp4 files in a directory
# gets movie posters from themoviedb.com for mp4 files in a directory
# MIT License
import os
import requests
import time
import tmdbsimple as tmdb
tmdb.API_KEY = 'YOUR_API_KEY_HERE'
directory = '/movies' # expects to have movies named with format '<Name> (<Year>).mp4'
@robwiss
robwiss / output.log
Created June 30, 2017 21:42
WSL SSH key error when not in user directory
INFO global: Vagrant version: 1.9.6
INFO global: Ruby version: 2.3.4
INFO global: RubyGems version: 2.5.2
INFO global: VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
INFO global: VAGRANT_OLD_ENV_LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35
diff --git a/src/Controller/TreeController.php b/src/Controller/TreeController.php
index d3d9fe6..3686de4 100644
--- a/src/Controller/TreeController.php
+++ b/src/Controller/TreeController.php
@@ -34,6 +34,7 @@ class TreeController implements ControllerProviderInterface
return $app['twig']->render('tree.twig', array(
'files' => $files->output(),
+ 'repo_path' => $repository->getPath(),
'repo' => $repo,
--- /root/src/gitlist/themes/default/js/showdown.js 2014-09-02 17:06:41.000000000 -0400
+++ showdown.js 2016-12-06 13:35:16.933049198 -0500
@@ -746,6 +746,15 @@
}
}
+ var isAbs = new RegExp('^(?:[a-z]+:)?//', 'i');
+ if (! isAbs.test(url))
+ {
+ var currentlocation = window.location['href'];
# Copyright 2017 Robert Wissmann
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR T
@robwiss
robwiss / gist:06ef1cc830f43a91a57b
Created May 23, 2015 00:15
code that will create race condition involving turtle mock::sequence
#define BOOST_TEST_DYN_LINK 1
#define BOOST_TEST_MODULE test_sequence
#define MOCK_THREAD_SAFE
#include <boost/test/unit_test.hpp>
#include <turtle/mock.hpp>
#include <thread>
#include <mutex>
@robwiss
robwiss / boost1.55.0.diff
Last active August 29, 2015 14:07
boost-gcc 1.55.0 patch
Index: Makefile
===================================================================
--- Makefile (revision 24202)
+++ Makefile (working copy)
@@ -1,8 +1,7 @@
# $Id$
NAME = boost
-VERSION = 1.49.0
-CATEGORIES = lib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.