start new:
tmux
start new with session name:
tmux new -s myname
| console.reset = function () { | |
| return process.stdout.write('\033c'); | |
| } |
| # check if job exists | |
| curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken | |
| # with folder plugin | |
| curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
| # without folder plugin | |
| curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
| # create folder |
| const bus = {}; | |
| const get = e => (bus[e] = bus[e] || new Set()); | |
| export const listeners = new Proxy(bus, { get }); | |
| export const emit = (e, ...args) => listeners[e].forEach(fn => fn(...args)); |
| var BASE64_MARKER = ';base64,'; | |
| function convertDataURIToBinary(dataURI) { | |
| var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length; | |
| var base64 = dataURI.substring(base64Index); | |
| var raw = window.atob(base64); | |
| var rawLength = raw.length; | |
| var array = new Uint8Array(new ArrayBuffer(rawLength)); | |
| for(i = 0; i < rawLength; i++) { |
Table of Contents generated with DocToc
| 'use strict'; | |
| /* To test: | |
| * echo -n <input> | nc localhost 1337 | |
| * | |
| * Results are <input>:<nonce> | |
| * | |
| * Passing e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e should get back | |
| * e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e:2c8 | |
| */ |
| #!/bin/bash | |
| # Usage: slackpost <token> <channel> <message> | |
| # Enter the name of your slack host here - the thing that appears in your URL: | |
| # https://slackhost.slack.com/ | |
| slackhost=PUT_YOUR_HOST_HERE | |
| token=$1 |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| using UnityEngine; | |
| using System.Collections; | |
| public class TerrainGenerator : MonoBehaviour { | |
| public Texture2D grassTexture; | |
| public Texture2D rockTexture; | |
| void Start() |