Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard.
This is the base javascript:
(function (text) {
var node = document.createElement('textarea')
var selection = document.getSelection()| # ~/.ipython/profile_default/startup/01-esc-dot.py | |
| from IPython import get_ipython | |
| from prompt_toolkit.enums import DEFAULT_BUFFER | |
| from prompt_toolkit.keys import Keys | |
| from prompt_toolkit.filters import HasFocus, HasSelection, ViInsertMode, EmacsInsertMode | |
| ip = get_ipython() | |
| insert_mode = ViInsertMode() | EmacsInsertMode() | |
| $('.outdated-diff-comment-container').addClass('open'); |
| import hudson.model.* | |
| String newJdkName = "JDK 1.7.0_80" | |
| boolean dryRun = true | |
| def h = Hudson.getInstance() | |
| Set jdks = new HashSet() | |
| def newJdk = h.getJDK(newJdkName) | |
| assert newJdk, "unable to find a configured jdk named ${newJdkName}" |
| #!/bin/bash | |
| IN=`echo $1 | base64` | |
| SUFFIX="::::MAGIC::::" | |
| MASTER_KEY=`cat /var/jenkins_home/secrets/master.key` | |
| HASHED_MASTER_KEY=`echo -n $MASTER_KEY | sha256sum | cut -d " " -f 1` | |
| HASHED_MASTER_KEY_16=${HASHED_MASTER_KEY:0:16} | |
| openssl enc -d -aes-128-ecb -in /var/jenkins_home/secrets/hudson.util.Secret -K $HASHED_MASTER_KEY -out /tmp/hudson.key | |
| HUDSON_KEY=`cat /tmp/hudson.key` | |
| HUDSON_KEY_TRIMMED=${HUDSON_KEY:0:-16} | |
| HUDSON_KEY_16=${HUDSON_KEY_TRIMMED:0:16} |
| #!groovy | |
| // imports | |
| import hudson.plugins.git.* | |
| import hudson.plugins.git.extensions.* | |
| import hudson.plugins.git.extensions.impl.* | |
| import jenkins.model.Jenkins | |
| // parameters | |
| def jobParameters = [ |
| #Generate master.key and secret | |
| MAGIC="::::MAGIC::::" | |
| mkdir -p /var/jenkins_home/secrets | |
| openssl rand -hex 128 > /var/jenkins_home/secrets/master.key | |
| openssl dgst -sha256 -binary /var/jenkins_home/secrets/master.key > /tmp/master.hashed | |
| HEX_MASTER_KEY=`head -c 16 /tmp/master.hashed | xxd -l 16 -p` | |
| openssl rand 259 > /tmp/base | |
| echo $MAGIC >> /tmp/base | |
| openssl enc -aes-128-ecb -in /tmp/base -K $HEX_MASTER_KEY -out /var/jenkins_home/secrets/hudson.util.Secret |
| ### Last tested February 7 2014 on a Galaxy S3 (d2att) running Cyanogenmod 11 nightly, with Google Authenticator 2.49. | |
| ### Device with Google Authenticator must have root. | |
| ### Computer requires Android Developer Tools and SQLite 3. | |
| ### Connect your device in USB debugging mode. | |
| $ cd /tmp | |
| $ adb root | |
| $ adb pull /data/data/com.google.android.apps.authenticator2/databases/databases |
| jenkins.model.Jenkins.getInstance().getUpdateCenter().getSites().each { site -> | |
| site.updateDirectlyNow(hudson.model.DownloadService.signatureCheck) | |
| } | |
| hudson.model.DownloadService.Downloadable.all().each { downloadable -> | |
| downloadable.updateNow(); | |
| } | |
| def plugins = jenkins.model.Jenkins.instance.pluginManager.activePlugins.findAll { | |
| it -> it.hasUpdate() |