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
| // Content Script to save data. | |
| chrome.extension.sendRequest({storage: 'foo', value: 'bar'}); | |
| // Content Script to get data. | |
| chrome.extension.sendRequest({storage: 'foo'}, function(response) { | |
| console.log('foo => ' + response.storage); | |
| }); | |
| // Background Page |
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
| @implementation IRWebViewController (irFullscreenMediaPlaybackAutorotationLayoutFix) | |
| - (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { | |
| // There is a bug, where launching a media player from the web view, fullscreening it, then rotating the device, and tapping on the media to see the timelime, causes the layout to go all berserk. This is a hack to combat that. | |
| [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; | |
| if ((!self.view.superview) || (self.parentViewController.modalViewController != self) || (self.modalPresentationStyle != UIModalPresentationFullScreen)) { |
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
| // Using metadata-extractor-2.4.0-beta-1.jar from http://www.drewnoakes.com/drewnoakes.com/code/exif/sampleUsage.html | |
| import com.drew.metadata.Metadata | |
| import com.drew.imaging.jpeg.JpegMetadataReader | |
| import com.drew.metadata.Directory | |
| import com.drew.metadata.Tag | |
| import java.text.*; | |
| def dirToProcess = new File(".") | |
| assert dirToProcess.exists() |
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
| ;;; mdfind-dired.el --- run a `mdfind' command and dired the output | |
| ;; Copyright (C) 1992, 1994, 1995, 2000, 2001, 2002, 2003, 2004, | |
| ;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. | |
| ;; Copyright (C) 2011 Kouzuka | |
| ;; Author: Roland McGrath <roland@gnu.org>, | |
| ;; Sebastian Kremer <sk@thp.uni-koeln.de> | |
| ;; Kouzuka | |
| ;; Keywords: unix |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>tableToExcel Demo</title> | |
| <script src="tableToExcel.js"></script> | |
| </head> | |
| <body> | |
| <h1>tableToExcel Demo</h1> | |
| <p>Exporting the W3C Example Table</p> |
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/env ruby | |
| ## disconnect | |
| # ./disconnect.rb -u yourusername | |
| # | |
| # This is a command-line utility for the bulk-downloading of run data from | |
| # the connect.garmin.com web application, which has lackluster export | |
| # capabilities. | |
| # |
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/env perl | |
| # | |
| # Fires HTTP request batches at the specified hostname | |
| # and analyzes the response times. | |
| # | |
| # If you have suspicious frequency of 3.00x, 9.00x, 21.00x | |
| # seconds, then most probably you have a problem of packet loss | |
| # in your network. | |
| # | |
| # cosimo@opera.com, sometime in 2011 |
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
| function toggle-list-sep | |
| { | |
| $path = "hkcu:\Control Panel\International" | |
| $key = "sList" | |
| $cur_sep = (Get-ItemProperty -path $path -name $key).$key | |
| if ($args.Length -gt 0) { $value = $args[0] } | |
| elseif ($cur_sep -eq ",") { $value = "|" } | |
| else { $value = "," } |
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
Show hidden characters
| [ | |
| { "keys": ["ctrl+shift+x"], "command": "tidy_xml" }, | |
| { "keys": ["ctrl+shift+j"], "command": "prettify_json" } | |
| ] |
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
| urlencode() { | |
| # urlencode <string> | |
| old_lc_collate=$LC_COLLATE | |
| LC_COLLATE=C | |
| local length="${#1}" | |
| for (( i = 0; i < length; i++ )); do | |
| local c="${1:$i:1}" | |
| case $c in |