Skip to content

Instantly share code, notes, and snippets.

View marsater's full-sized avatar

David Mårsäter marsater

View GitHub Profile

Keybase proof

I hereby claim:

  • I am marsater on github.
  • I am david404 (https://keybase.io/david404) on keybase.
  • I have a public key ASAtK3mX-h8SIp-2xE2JlE9Z3kI2OYCJ8Cu56eEfk7S51Ao

To claim this, I am signing this object:

@marsater
marsater / change-csv.py
Last active July 7, 2018 14:21
Simple python script for changing contents in a csv file.
# -*- coding:utf8 -*-
# Python 3
import csv
# read
with open('aFile.csv', newline='') as csvfile:
reader = csv.DictReader(csvfile)
with open('newFile.csv', 'w', newline='') as csvfile: # write
fieldnames = ['x', 'y']
@marsater
marsater / app.js
Created March 17, 2018 09:21
Simple Nodejs socket.io client script for testing server side socket handling.
var io = require('socket.io-client');
var socket = io.connect('http://localhost:3000', {reconnect: true});
// Add a connect listener
socket.on('connect', function (socket) {
console.log('Connected!');
});
socket.emit('tja', { // send a message named tja
id: 1,