Instantly share code, notes, and snippets.

View gist:159c16bd87c5e2651bcd1ef290f50df4
@@ -1191,16 +1191,6 @@ class TimelineExtractor:
).order_by(
models.HistoricalEvent.start_date_days.desc()
).first()
- if capital_event is None or capital_event.planet.planet_id != capital.planet_id:
- self._session.add(models.HistoricalEvent(
- event_type=models.HistoricalEventType.capital_relocation,
- country=country_model,
- leader=ruler,
- start_date_days=self._date_in_days,
View nortel.rb
class Nortel < Oxidized::Model
# nortel switch config download
prompt /^>>.+\#\s/
comment '/* '
cmd '/info/sys/general' do |c|
comment c
end
cmd '/info/link' do |c|
comment c
end
View gist:78bb46fee6e425dfd3097dd98feb4969
![img](http://i.imgur.com/dWMyOyw.gif)
![img](http://i.imgur.com/01Y93sL.gif)
![img](http://i.imgur.com/056er39.gif)
![img](http://i.imgur.com/05Y6pFQ.gif)
![img](http://i.imgur.com/0TJtp5D.gif)
![img](http://i.imgur.com/0YIsVNu.gif)
![img](http://i.imgur.com/0p3PUar.gif)
![img](http://i.imgur.com/0vqExjm.gif)
![img](http://i.imgur.com/13z8S8A.gif)
![img](http://i.imgur.com/18nauQl.gif)
View gist:db74322ca9a17963e82434d311a722c0
diff --git a/auth.php b/auth.php
index 33d7279..87c2ee2 100644
--- a/auth.php
+++ b/auth.php
@@ -22,7 +22,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
/* @var array $_pattern User filter pattern */
protected $_pattern = null;
-
+ protected $cache = null;
View gist:4ed8773dbb69d44b4ac9
class yum::nginx {
file {"/etc/pki/rpm-gpg/RPM-GPG-KEY-nginx":
source => "puppet:///modules/yum/nginx.asc",
ensure => present,
owner => root,
group => root,
mode => 644,
}
exec { "nginx_import":
command => "rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-nginx",
View gist:735b1c1467aee586d5e4
{
"spec_version": "v1.6",
"identifier": "installed-default",
"version": "2015.06.03.08.49.56",
"license": "unknown",
"name": "installed-default",
"abstract": "A list of modules installed on the default KSP instance",
"kind": "metapackage",
"depends": [
{
View gist:f3b680f9fc94a288e61a
527 [1] ERROR CKAN.ErrorDialog (null) - Error in autoupdate:
Could not load file or assembly 'Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
2420 [1] ERROR CKAN.Main (null) - Error in autoupdate
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at CKAN.Main.OnLoad (System.EventArgs e) [0x00000] in <filename unknown>:0
3361 [1] WARN CKAN.URLHandlers (null) - Skipping URL handler: Parsing Error: Could not parse file ~/.local/share/applications/mimeapps.list
The following inconsistencies were found:
CommunityTechTree requires ModuleManager but nothing provides it
* RasterPropMonitor requires ModuleManager but nothing provides it
View gist:b22ad3d1174bdc851281
{
"spaces": [
{
"name": "short_term",
"retentionPolicy": "30d",
"shardDuration": "1d",
"regex": "/^.*/",
"replicationFactor": 2,
"split": 1
},
View gist:fbb7b948b7169419236e
bind SPACE "+dota_camera_follow; +dota_camera_follow; -dota_camera_follow"
Enter that into the console and space will center with a single tap. It doesn't lock the camera though so I will see if there is a better bind.
edit:
dota_camera_follow_doublepress_time 100
entering this is likely needed to make it work right. Tried some stuff and not sure how to reset it to check if it is strictly necessary.
@XANi
XANi / collectd.clj
Last active Jan 4, 2016
riemann collectd derive/counter -> rate
View collectd.clj
; Expire old events from the index every 5 seconds.
(periodically-expire 600)
(def graph (graphite {:host "127.0.0.1"}))
; Keep events in the index for 5 minutes by default.
(let [index (default :ttl 300 (update-index (index)))]
; Inbound events will be passed to these streams:
(streams