Skip to content

Instantly share code, notes, and snippets.

View wattengard's full-sized avatar
☺️

Christian Wattengård wattengard

☺️
View GitHub Profile
const getDaysPages = (fromDate) => {
const myDate = DateTime.fromString(fromDate, 'yyyy-MM-dd');
const getDayPage = dayNum => dv.dv.page(`${DAILY_NOTES_PATH}/${myDate.plus({ days : dayNum }).toISODate()}`);
return Array.from({length: 7}, (c, i) => getDayPage(i) || 0);
}
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
"series": [{
"type": "column",
"name": "Column",
"data": [
{ "y": 0, "color": "#ed9d97" },
{ "y": 62.28, "color": "#ed9d97" },
{ "y": 67.14, "color": "#ed9d97" },
{ "y": 74.07, "color": "#ffe168" },
{ "y": 68.74, "color": "#ffe168" },
{ "y": 73.66, "color": "#7bcfa9" },
@wattengard
wattengard / gist:7906929
Created December 11, 2013 08:38
Anglebrackets around usernames on IRCCloud
.author:before { content: "<"; }
.author:after { content: ">"; }
@wattengard
wattengard / gist:7542052
Created November 19, 2013 08:22
Phantomjs hard fail
Renaming extracted folder \tmp\phantomjs\phantomjs-1.9.2-windows.zip-extract-1384849047801\phantomjs-1.9.2-windows -> d:\src\highcharts_senterforledelse\node_modules\grunt-mocha\node_modules\grunt-lib-phantomjs\node_modules\phantomjs\lib\phantom
Phantom installation failed { [Error: ENOTEMPTY, directory not empty 'd:\tmp\phantomjs\phantomjs-1.9.2-windows.zip-extract-1384849047801\phantomjs-1.9.2-windows']
errno: 53,
code: 'ENOTEMPTY',
path: 'd:\\tmp\\phantomjs\\phantomjs-1.9.2-windows.zip-extract-1384849047801\\phantomjs-1.9.2-windows', syscall: 'rmdir' } Error: ENOTEMPTY, directory not empty 'd:\tmp\phantomjs\phantomjs-1.9.2-windows.zip-extract-1384849047801\phantomjs-1.9.2-windows'
at Object.fs.rmdirSync (fs.js:456:18)
at rimrafSync (d:\src\highcharts_senterforledelse\node_modules\grunt-mocha\node_modules\grunt-lib-phantomjs\node_modules\phantomjs\node_modules\rimraf\rimraf.js:160:6)
at d:\src\highcharts_senterforledelse\node_modules\grunt-mocha\node_modules\grunt-lib-phantomjs\node_modul
Joachim T: Hei, hvordan kan jeg hjelpe deg?
You: Hei. Jeg fikk melding fra dere om at dere "henla" sak 2627075 fordi det ikke var oppnådd kontakt med meg.
You: kan du sjekke hva denne saken gjelder? jeg sjonglerer et par saker hos dere akkurat nå. (fungerer også som støttekontakt for svigers) ;)
Joachim T: hva er din adresse og ditt navn? eller har du et kunde nr?
You: Mitt kundenummer er 20765090
You: noe som jeg også skriver inn når jeg starter chatten..........
You: saken kan også være relatert til kundenummer 20824712, Kjell Johnsen
Joachim T: kan desverre ikke se noe til denne saken.
Joachim T: hva gjaldt denne saken?
You: det er kanskje forskjell på saksnummer og feilmeldingsreferanse?
var watch = new System.Diagnostics.Stopwatch();
var wc = new System.Net.WebClient();
System.Console.WriteLine("Starting download");
watch.Start();
var res = wc.DownloadData(@"http://ftp.sunet.se/pub/os/Linux/kernels/v3.x/linux-3.0.1.tar.gz");
watch.Stop();
System.Console.WriteLine("Done");
var w = File.AppendText("testscript.log");
@wattengard
wattengard / gist:3816744
Created October 2, 2012 06:21
Powershell script to mail changelog for recent day
# Send SVN log to mail recipients
# Get SVN-formatted date for yesterday
$yesterday = $yesterday = ((Get-Date) - ([System.TimeSpan]::FromDays(1))).ToString("yyyy-MM-dd")
# Our SVN-command. This is failing/working on two different systems. It's complaining about the DATE-format in the revision parameter
# You should also probably add the --username and --password parameters
$svncommand = "svn log -r '{$yesterday}:HEAD' svn://my.svn.server/project/trunk"
# Hack to get correct output encoding
<div class="bloc calendar" id="kalender" data-year="2011" data-month="6">
<div class="title">
<a href="#" class="prev" data-year="2011" data-month="5" title="mai 2011">Prev</a>juni 2011<a href="#" class="next" data-year="2011" data-month="7" title="juli 2011">Next</a>
</div>
<div class="content">
<table>
<thead>
<tr>
<th>
m
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.IO" #>
<#@ output extension=".cs" #>
<#
var files = Directory.EnumerateFiles(Host.ResolvePath(""), "*.sql");
#>
namespace Rappgen_WEB {