Skip to content

Instantly share code, notes, and snippets.

/**
* This code is responsible for implementing all methods related to fetching
* and returning data for the Norwegian data sources.
*/
'use strict';
import { REQUEST_TIMEOUT } from '../lib/constants';
import { default as baseRequest } from 'request';
const request = baseRequest.defaults({timeout: REQUEST_TIMEOUT});
import { default as moment } from 'moment-timezone';
#!/usr/bin/env bash
# Finds disk and partition where boot is mounted
lsblk -i --output KNAME,TYPE,MOUNTPOINT | while read KNAME TYPE MOUNTPOINT
do
if [ "$TYPE" = "disk" ]; then
SELECTED_DISK="$KNAME"
elif [ "$MOUNTPOINT" = "/boot" ]; then
printf "Disk: $SELECTED_DISK\nPartition: $KNAME\n"
fi
done
# docker-compose logs
Attaching to dockerhub-webhook
dockerhub-webhook | 170315/223033.121, [log,Server running at: http://c1b4519c9fc3:3000] data: (none)
dockerhub-webhook | 170315/223033.131, [log,Serving hook at: http://c1b4519c9fc3:3000/api/abc123] data: (none)
dockerhub-webhook | 170315/223524.262, (1489617324242:c1b4519c9fc3:7:j0bjiqtg:10000) [request,debug] data: Payload from docker hub:
dockerhub-webhook | 170315/223524.263, (1489617324242:c1b4519c9fc3:7:j0bjiqtg:10000) [request,debug] data: {"push_data":{"pushed_at":1489617323,"images":[],"tag":"latest","pusher":"maccyber"},"callback_url":"https://registry.hub.docker.com/u/maccyber/maccyber.io/hook/*sens*/","repository":{"status":"Active","description":"Website maccyber.io","is_trusted":true,"full_description":"[![Build Status](https://travis-ci.org/maccyber/maccyber.io.svg?branch=master)](https://travis-ci.org/maccyber/maccyber.io)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http
# Maintainer: Jan Magnus Brevik <janmbrevik at gmail dot com>
# Contributor: Rubén Fdes Moreira <tmp-meteque@openmailbox.com>
# Contributor: Sigmund Vestergaard <sigmundv at gmail dot com>
# Contributor: MacCyber <jonas.enge at gmail dot com>
# Contributor: Doug Newgard <scimmia22 at outlook dot com>
# Contributor: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Antti Hautaniemi <an7oine at me com>
pkgname=acestream-engine
pkgver=3.1.16

Dataset

Johnson's IPIP-NEO 120 data repository

https://osf.io/tbmh5/

Age

Divide into Eight age groups

  • 16 - 19
@maccyber
maccyber / no-domains-zeit-nameserver.md
Last active October 21, 2018 18:53
no-domains-zeit-nameserver.md

.no domains with zeit nameservers

Howto configure .no domains with zeit's nameservers on domeneshop.

One

now domains add example.no --force

Two

@maccyber
maccyber / eliteserien-tabell-api.js
Last active June 29, 2020 21:10
Fugly kode som henter eliteserietabellen fra NRK
const fetch = require('node-fetch')
const URL = 'https://sportsresultater.nrk.no/kasparov.api/idretter/501/turneringer/3006/sesonger/199399/konkurranser/314629/tabell'
const reformatTable = ({ lag, _embedded: { tabell } }) => (
tabell.map(({ celler }) => {
const { tekst: posisjon, indeks: index } = celler.find(({ type }) => type === 'posisjon')
const { id } = celler.find(({ type }) => type === 'lookup')
const { tekst: formkurve } = celler.find(({ type }) => type === 'formkurve')
const { navn, kortnavn, hashtag } = lag[id]
return {
{
"accessors": [
{
"bufferView": 2,
"componentType": 5126,
"count": 36,
"max": [
0.035131800919771194,
-0.59078401327133179,
0.15331600606441498
#!/bin/bash
FILE="/tmp/leaf.cache"
USERNAME=myleaf@leaf.com
PASSWORD=mypassword
update_status() {
result=`leaf-connect-cli cachedStatus -u $USERNAME -p $PASSWORD -r NE`
BATTERY_STATUS=`echo ${result} | jq '.BatteryStatusRecords.BatteryStatus.SOC.Value' | sed 's/"//g'`
CHARGING_STATUS=`echo ${result} | jq '.BatteryStatusRecords.BatteryStatus.BatteryChargingStatus' | sed 's/"//g'`
const pluralize = (str, n) => str + (n !== 1 ? 's' : '')
const bottleText = n => `${n || 'No more'} ${pluralize('bottle', n)}`
function sing (start = 99, stop = 0) {
const [currentBottles, remainingBottles] = [bottleText(start), bottleText(start - 1)]
console.log(`${currentBottles} of beer on the wall, ${currentBottles.toLowerCase()} of beer.`)
if (!start) {
return console.log('Go to the store and buy some more, 99 bottles of beer on the wall')