Skip to content

Instantly share code, notes, and snippets.

Roy Sindre Norangshol norrs

Block or report user

Report or block norrs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ac102727be5ae10d0628dd169e68cf04
systemctl cat --user git-sync-powersavehelper
# /home/norangshol/.config/systemd/user/git-sync-powersavehelper.service
[Unit]
Description = Disable and Enable git-sync depending on AC power
ReloadPropagatedFrom = sys-susbsystem-power_supply-main_AC.device
[Service]
ExecStart = /usr/bin/env git-sync-powersavehelper
ExecReload = /usr/bin/env git-sync-powersavehelper
RemainAfterExit=true
View gist:a1e911b312d0ae5ac1ad26b57d7edf7f
#!/bin/bash -xe
INSTALLER_DEST=$1
DEBINSTROOT=http://ftp.no.debian.org/debian/dists
DEBINSTROOT2=https://d-i.debian.org/daily-images #/amd64/daily/netboot/
FWTMP=/tmp/d-i_firmware
mkdir -p ${INSTALLER_DEST}/{sid,buster,stretch}/{amd64,i386}
for DIST in sid buster stretch
do
rm -rf $FWTMP
@norrs
norrs / container-builder-local-fix
Last active Mar 28, 2018
Wrap the original container-builder-local so we can use cloudbuild.yaml files with COMMIT_SHA.
View container-builder-local-fix
#!/usr/bin/env bash
# Wrapper around container-builder-local to deal with annoying missing features.
# Missing global subtituions by tool:
# COMMIT_SHA not being available.
command -v container-builder-local >/dev/null 2>&1 || { echo -e >&2 "I require container-builder-local but it's not installed. Aborting.\\nhttps://github.com/GoogleCloudPlatform/container-builder-local#install-using-gcloud"; exit 1; }
command -v envsubst >/dev/null 2>&1 || { echo >&2 "I require envsubst but it's not installed. Aborting."; exit 1; }
die() {
View gist:ba7ea06ad4e50c0791f8d85da80c0f35
pipeline:
try {
stage 'build':
node {
..
..
}
stage 'deploy stage':
View gist:26f222d8514259cfbf30
-- mod-[1..9] %! Switch to workspace N
-- mod-shift-[1..9] %! Move client to workspace N
[((m .|. modMask, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
View gist:94db6ee965f4ce622ae5
{"timestamp":"2014-09-28T13:43:32.998048+0200","level":"error","message":"InfluxDB: Error setting up event object - [\"/etc/sensu/extensions/influx.rb:24:in `run'\", \"/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-extension-1.0.0/lib/sensu/extension.rb:99:in `safe_run'\", \"/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.13.1/lib/sensu/server.rb:307:in `block (2 levels) in handle_event'\", \"/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.13.1/lib/sensu/server.rb:206:in `call'\", \"/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.13.1/lib/sensu/server.rb:206:in `block in mutate_event_data'\", \"/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-extensions-1.0.0/lib/sensu/extensions/mutators/json.rb:16:in `run'\", \"/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-extension-1.0.0/lib/sensu/extension.rb:99:in `safe_run'\", \"/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.13.1/lib/sensu/server.rb:227:in `mutate_event_data'\", \"/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.13.1/
View gist:e92f24e82acd55ce0cbb
[ -s "/home/rockj/.nvm/nvm.sh" ] && . "/home/rockj/.nvm/nvm.sh" # This loads nvm
rockj@pandora:~/dev/javascript$ [ -s "/home/rockj/.nvm/nvm.sh" ] && . "/home/rockj/.nvm/nvm.sh"
rockj@pandora:~/dev/javascript$ nvm uninstall 0.10
Uninstalled node v0.10.29
rockj@pandora:~/dev/javascript$ nvm install 0.10
######################################################################## 100.0%
Now using node v0.10.29
rockj@pandora:~/dev/javascript$ npm cache clean
rockj@pandora:~/dev/javascript$ mkdir experiments
rockj@pandora:~/dev/javascript$ cd experiments/
View gist:10528823
; TG14-partysone
tg14 NS brad.tg14.gathering.org.
tg14 NS janet.tg14.gathering.org.
brad.tg14 A 151.216.254.2
AAAA 2a02:ed02:254::2
janet.tg14 A 151.216.253.2
AAAA 2a02:ed02:253::2
; Husk å legge til dette i partyzone NS
;ns1.tg14 CNAME brad.tg14
;ns2.tg14 CNAME janet.tg14
View ZOOKEEPER-1371.patch
diff --git build.xml build.xml
index 212174e..c641d4f 100644
--- build.xml
+++ build.xml
@@ -243,6 +243,15 @@ xmlns:maven="antlib:org.apache.maven.artifact.ant">
<path refid="java.classpath"/>
</path>
+ <path id="test.java.classpath.without.log4j">
+ <pathelement location="${test.java.classes}" />
@norrs
norrs / zookeeper-1371.patch
Created Apr 1, 2014
zookeeper-1371.patch
View zookeeper-1371.patch
Index: src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java (revision b5c25d7ee1b940f919f718032d101c26c46f30b2)
+++ src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java (revision )
@@ -26,7 +26,6 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
You can’t perform that action at this time.