This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// how_much_netflix.js | |
// A script that looks through your Netflix viewing activity and | |
// tallys up how much time you've spent watching Netflix | |
// | |
// INSTRUCTIONS TO USE: | |
// Open https://www.netflix.com/WiViewingActivity and the developer console | |
// Copy and paste this script into the developer console and press enter | |
// | |
(function() { | |
var fetchAllViewedItems = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/pkg/errors" | |
"github.com/rancher/go-rancher-metadata/metadata" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jenkins.model.* | |
def matchedJobs = Jenkins.instance.items.findAll { job -> | |
job.name =~ /job_regex_here/ | |
} | |
matchedJobs.each { job -> | |
def latest = job.getLastSuccessfulBuild() | |
def name = job.name | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jenkins.model.* | |
def matchedJobs = Jenkins.instance.items.findAll { job -> | |
job.name =~ /job_regex_here/ | |
} | |
matchedJobs.each { job -> | |
println job.name | |
// without parameters | |
//job.scheduleBuild(new Cause.UserIdCause()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from http://stackoverflow.com/a/34520110 | |
node { | |
echo "I am a "+getClass().getName() | |
echo "PARAMETERS" | |
echo "==========" | |
echo getBinding().getVariables().getClass().getName() | |
def myvariables = getBinding().getVariables() | |
for (v in myvariables) { | |
echo "${v} " + myvariables.get(v) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/containers | |
/containers/0 | |
/containers/0/create_index : | |
/containers/0/health_state : | |
/containers/0/host_uuid : da4aa4b0-ee2f-4ad3-8ded-b09917821cfa | |
/containers/0/hostname : dockermachine | |
/containers/0/ips | |
/containers/0/ips/0 : 10.42.176.231 | |
/containers/0/labels | |
/containers/0/name : Network Agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from http://superuser.com/a/589532 | |
Jenkins.instance.getItemByFullName('jobName').builds.findAll { it.number > 1 && it.number < 100 }.each { it.delete() } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# using an image with NetworkManager disabled from starting | |
INFO global: Vagrant version: 1.8.1 | |
INFO global: Ruby version: 2.2.3 | |
INFO global: RubyGems version: 2.4.5.1 | |
INFO global: VAGRANT_VAGRANTFILE="/home/ubuntu/project/Vagrantfile.rhel-project" | |
INFO global: VAGRANT_LOG="debug" | |
INFO global: VAGRANT_OLD_ENV_HOME="/home/ubuntu" | |
INFO global: VAGRANT_OLD_ENV_XDG_SESSION_ID="78" | |
INFO global: VAGRANT_OLD_ENV_PWD="/home/ubuntu/project" | |
INFO global: VAGRANT_OLD_ENV_GOPATH="/home/ubuntu/Projects/go" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jenkins.model.* | |
def matchedJobs = Jenkins.instance.items.findAll { job -> | |
job.name =~ /my_regex_here/ | |
} | |
matchedJobs.each { job -> | |
println job.name | |
//job.delete() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: npm install plist-json && node readinglist2json.js | |
var plist = require('plist-json'); | |
plist.parse(process.env.HOME + '/Library/Safari/Bookmarks.plist', function(err, json) { | |
if (err) { | |
console.log(err); | |
return; | |
} | |
for (i=0; i<json.Children.length; i++) { |
NewerOlder