This file contains hidden or 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
| #!/bin/bash | |
| # First verify the version of Java being used is not Oracle JDK. | |
| java -version | |
| # Get the latest Oracle Java SDK http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | |
| wget -c --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u31-b13/jdk-8u31-linux-x64.rpm" --output-document="jdk-8u31-linux-x64.rpm" | |
| # Install Java SDK | |
| sudo rpm -i jdk-8u31-linux-x64.rpm |
This file contains hidden or 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
| :foreach i in=[/ip dns cache find] do={ | |
| :local bNew "true"; | |
| :local cacheName [/ip dns cache all get $i name] ; | |
| # :put $cacheName; | |
| :if (([:find $cacheName "facebook" -1] >= 0) || ([:find $cacheName "outlook" -1] >= 0)) do={ | |
| :local tmpAddress [/ip dns cache get $i address] ; | |
| :put $cacheName; | |
| :put $tmpAddress; |
This file contains hidden or 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
| ----- Esc ----- | |
| Quick change directory: Esc + c | |
| Quick change directory history: Esc + c and then Esc + h | |
| Quick change directory previous entry: Esc + c and then Esc + p | |
| Command line history: Esc + h | |
| Command line previous command: Esc + p | |
| View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
| Print current working directory in command line: Esc + a | |
| Switch between background command line and MC: Ctrl + o | |
| Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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
| #!/usr/bin/ruby | |
| # Create display override file to force Mac OS X to use RGB mode for Display | |
| # see http://embdev.net/topic/284710 | |
| require 'base64' | |
| data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
| edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
| vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
This file contains hidden or 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
| #!/bin/sh - | |
| IFS=" | |
| " | |
| OPTIONS_KEEPDASHDASH= | |
| OPTIONS_SPEC="\ | |
| git export <options> <rev>{0,2} | |
| -- | |
| o= Export directory. |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Open Feedly in Background | |
| // @author toru hamaguchi | |
| // @namespace https://gist.github.com/toru-hamaguchi/9916038#file-userscript-js | |
| // @description Open Feedly feed item in background tab. | |
| // @license Creative Commons Attribution License | |
| // @version 0.1 | |
| // @include http*://feedly.com/* | |
| // @compatible Greasemonkey | |
| // ==/UserScript== |
This file contains hidden or 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
| Here is a quick instructions on how to setup the Python command line tool for PagerDuty. | |
| 1) You'll need to have Python installed (tested with Python 2.6.1) | |
| 2) Verify if Python setuptools are installed | |
| python -c "import setuptools;print 'OK';" | |
| if you don't see output "OK", then setuptools are not installed. | |
| To install setuptools, download setuptools (http://pypi.python.org/pypi/setuptools/) appropriate to your Python major version. ("python --version" to get the version number). |
This file contains hidden or 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-Module ActiveDirectory | |
| #Import users via the PD API, echo results | |
| function POST_Request ($url,$parameters, $api_key) { | |
| $http_request = New-Object -ComObject Msxml2.XMLHTTP | |
| $http_request.open('POST', $url, $false) | |
| $http_request.setRequestHeader("Content-type", "application/json") | |
| $token = "Token token=" + $api_key | |
| $http_request.setRequestHeader("Authorization", $token) | |
| $http_request.setRequestHeader("Content-length", $parameters.length) |
This file contains hidden or 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
| /* | |
| * Must be run from backgroup script as a user with the elevated security_admin role | |
| */ | |
| // migrate incident id values | |
| migrateIncidents(); | |
| // migrate group attributes from legacy update set application to the new Fuji store app | |
| migrateGroups(); |
OlderNewer