Skip to content

Instantly share code, notes, and snippets.

View cvuorinen's full-sized avatar
🕸️
Inthewebs

Carl Vuorinen cvuorinen

🕸️
Inthewebs
View GitHub Profile
@cvuorinen
cvuorinen / version-badge.js
Last active November 2, 2020 05:54
Version Badge
const querystring = require('querystring');
const semver = require("semver");
const dateFns = require("date-fns");
const versionDates = {
// https://nodejs.org/en/about/releases/
// https://endoflife.date/nodejs
nodejs: [
{ version: "16.x", eol: "2024-04-30" },
{ version: "15.x", eol: "2021-06-01" },
@cvuorinen
cvuorinen / keybase.md
Created April 22, 2020 11:43
keybase.md

Keybase proof

I hereby claim:

  • I am cvuorinen on github.
  • I am cvuorinen (https://keybase.io/cvuorinen) on keybase.
  • I have a public key ASC8S8pTO7Pskhc8K6Aa4oCgRlhytBXVTdQ7BgZjGxZEdwo

To claim this, I am signing this object:

@cvuorinen
cvuorinen / README.md
Created January 8, 2018 12:35
README template

Project title

Short description about the project and it's purpose. Includes e.g. projects main goal, intended users, some history (if old project) etc.

Team

Project team and other people that are involved with the project.

@cvuorinen
cvuorinen / raffle.html
Created August 25, 2017 11:00
Raffle a random name from a list (quickly display random names and gradually slow down until finally revealing winner)
<!DOCTYPE html>
<title>Raffle</title>
<script>
const names = `
Testy McTesterson
Teofila Kamer
Gerard Yann
Majorie England
Shantell Donaldson
Chuck Daily
@cvuorinen
cvuorinen / karma.conf.js
Last active October 19, 2020 13:03
Example configurations for running Karma & Protractor tests in headless Chrome (see http://cvuorinen.net/2017/05/running-angular-tests-in-headless-chrome/)
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
@cvuorinen
cvuorinen / autocomplete.js
Created May 5, 2016 17:52
RxJS & Angular 1 Autocomplete example with async filter
angular.module('app', ['asyncFilter'])
.directive('autocomplete', function () {
return {
scope: {},
template: '<input />' +
'<ul class="suggestions">' +
'<li ng-repeat="suggestion in suggestions | async:this">' +
'<a href="https://github.com/{{ suggestion }}"' +
' target="_blank">{{ suggestion }}</a>' +
'</li>' +
@cvuorinen
cvuorinen / autocomplete.js
Last active March 24, 2018 22:11
RxJS & Angular 1 Autocomplete example
angular.module('app', ['rx'])
.directive('autocomplete', function () {
return {
scope: {},
template: '<input ng-model="val" ng-change="update(val)" />' +
'<ul class="suggestions">' +
'<li ng-repeat="suggestion in suggestions">' +
'<a href="https://github.com/{{ suggestion }}"' +
' target="_blank">{{ suggestion }}</a>' +
'</li>' +
@cvuorinen
cvuorinen / asyncFilter.js
Last active April 19, 2016 23:41
asyncFilter.js - {{ observableOrPromise | async }}
angular
.module('asyncFilter', [])
.filter('async', function() {
const values = {};
const subscriptions = {};
function async(input, scope) {
// Make sure we have an Observable or a Promise
if (!input || !(input.subscribe || input.then)) {
return input;
@cvuorinen
cvuorinen / deploy.py
Last active February 3, 2018 20:40
Deploy Button on Olimex A20-OLinuXino-LIME with Jenkins build status and capistrano deploy. More information here: http://cvuorinen.net/2015/10/building-a-deploy-button/
#!/usr/bin/env python
import os
import time
from pyA20Lime.gpio import gpio
from pyA20Lime.gpio import port
from autojenkins import Jenkins
### configration parameters