Skip to content

Instantly share code, notes, and snippets.

@58bits
58bits / index.js
Created September 18, 2015 03:47
Server Extensions for Plugin
'use strict';
var Hoek = require('hoek');
var Util = require('util');
var Log = require('./lib/logger');
var Cache = require('./lib/cache');
var Mailer = require('./lib/mailer');
var Db = require('./lib/dbx');
var Storage = require('./lib/storage');
var Auth = require('./lib/auth');
@melekes
melekes / README.md
Created August 30, 2013 16:06
Test coverage Dashing widget

Test coverage

Test coverage

Description

Dashing widget to display test coverage.

The widget is based on JenkinsBuild, which shows you a completion percentage while Jenkins builds the project and zero in other cases. Actually, if you think about it, build takes only a small amount of time (of course, if your project is not building for half an hour). So we decided to find a more reasonable use of this state and show percentage of test coverage.

@wvengen
wvengen / install_scrapyd.sh
Last active May 31, 2019 07:27
Installation script for scrapyd
#
# Installation script for scrapyd on Debian/Ubuntu
# http://scrapyd.readthedocs.org/
#
# - Latest scrapyd from Scrapy package repository
# - Password protection with http basic auth
# - HTTPS with self-signed certificate
# - Works on Amazon EC2
#
FQDN=scrapy.example.com
@kalenwatermeyer
kalenwatermeyer / JenkinsLastCommit.md
Last active July 29, 2019 03:39
Jenkins - Last commit info widget

Jenkins Last Commit - screenshot

Description

The Jenkins Last Commit widget periodically fetches SCM change information from a Jenkins instance for a specified list of jobs.

This allows you to have multiple widgets simultaneously (monitoing separate jobs for changes).

Calls are made to the Jenkins API to retrieve the changeset object in a JSON form. This JSON object contains various pieces of information about the last commit made for the Jenkins job.

@kalenwatermeyer
kalenwatermeyer / JenkinsBuildStatusHistory.md
Last active March 10, 2020 16:03
Jenkins - Build status history for multiple jobs

Jenkins Build Status History - screenshot

Description

The Jenkins Build Status History widget periodically fetches a snapshot of build status information for a specified list of jobs on a Jenkins CI server.

As time progresses, new build status samples are added to the right, while older samples are removed from the left. This view allows you to quickly see the health of your jobs as well as any time trends.

Calls are made to the Jenkins API to retrieve the name and color properties of listed jobs in a JSON form. The color of a given job represents its current build status (i.e. "blue" => successful build, "red" => failing build and so on).

@planetoftheweb
planetoftheweb / base.css
Last active October 10, 2020 12:35
Base CSS document with google fonts, Eric Meyer's reset.css, Ethan Schoonover's solarized palette and some basic responsive code.
@import url(http://fonts.googleapis.com/css?family=Roboto+Slab:700|Exo+2:300,600);
/* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}
/* Solarized Palette - http://ethanschoonover.com/solarized ---------
lightgray : #819090;
gray : #70
@saghiralfasly
saghiralfasly / dataset_to_tfrecord.py
Last active April 29, 2022 06:16
Python script to create tfrecords from pascal VOC data set format (one class detection) for Object Detection API Tensorflow, where it divides dataset into (90% train.record and 10% test.record)
import os
import io
import glob
import hashlib
import pandas as pd
import xml.etree.ElementTree as ET
import tensorflow as tf
import random
from PIL import Image
@nuxodin
nuxodin / HTMLFormElement-HTMLInputElement.reportValidity.js
Last active January 7, 2023 19:52
Polyfill for reportValidity()
/* Copyright (c) 2016 Tobias Buschor https://goo.gl/gl0mbf | MIT License https://goo.gl/HgajeK */
if (!HTMLFormElement.prototype.reportValidity) {
HTMLFormElement.prototype.reportValidity = function() {
if (this.checkValidity()) return true;
var btn = document.createElement('button');
this.appendChild(btn);
btn.click();
this.removeChild(btn);
return false;
@JeremyMorgan
JeremyMorgan / states.sql
Last active October 3, 2023 12:55
An SQL Query to insert 50 U.S. States into a database.Make sure your auto increment is set in MySQL, and Identity_insert is set in MS-SQL.
CREATE TABLE [state](
[stateID] [int] IDENTITY(1,1) NOT NULL,
[stateCode] [nchar](2) NOT NULL,
[stateName] [nvarchar](128) NOT NULL,
CONSTRAINT [PK_state] PRIMARY KEY CLUSTERED
( [stateID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY])
ON [PRIMARY]
require "time"
require "date"
class Date
def to_time
Time.local(year, month, day)
end
end
class Time