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
(eval-and-compile | |
(customize-set-variable | |
'package-archives '(("org" . "https://orgmode.org/elpa/") | |
("melpa" . "https://melpa.org/packages/") | |
("gnu" . "https://elpa.gnu.org/packages/"))) | |
(package-initialize) | |
(unless (package-installed-p 'use-package) | |
(package-refresh-contents) | |
(package-install 'use-package))) |
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
(eval-and-compile | |
(customize-set-variable | |
'package-archives '(("org" . "https://orgmode.org/elpa/") | |
("melpa" . "https://melpa.org/packages/") | |
("gnu" . "https://elpa.gnu.org/packages/"))) | |
(package-initialize) | |
(unless (package-installed-p 'use-package) | |
(package-refresh-contents) | |
(package-install 'use-package))) |
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
(eval-and-compile | |
(customize-set-variable | |
'package-archives '(("org" . "https://orgmode.org/elpa/") | |
("melpa" . "https://melpa.org/packages/") | |
("gnu" . "https://elpa.gnu.org/packages/"))) | |
(package-initialize) | |
(unless (package-installed-p 'use-package) | |
(package-refresh-contents) | |
(package-install 'use-package))) |
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
[motivation] | |
command=/path/to/motivation/script/motivation | |
interval=900 |
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
(defun named-term (name) | |
(interactive "sName: ") | |
(command-execute 'term) | |
(if (not (string= 'name "")) | |
(rename-buffer 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
"epg": { // Widget name | |
"1": { // Major version | |
"minorVersion": 3, | |
"modules": { // Modules Object | |
"grid": { // grid Module | |
"holder": "#GRID", // Dom Element to insert grid into | |
"nav": { // Navigation configuration | |
"days": 8, | |
"showDates": true, | |
"showTime": true |
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
chrome.extension.onMessage.addListener( | |
/* | |
request = payload | |
sender = information about the payload | |
sendResponse = function to send response to. Explanation above (1). | |
*/ | |
function(request, sender, sendResponse){ | |
var tabId = sender.tab.id, // Which tab is the query from? | |
isValid; | |
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
function getXHR(url, callback) { | |
var xhr = new XMLHttpRequest(); // Creates a new XHR request | |
if (!url) { | |
throw new Error('No URL supplied'); | |
} | |
xhr.open("GET", url, true); // Open the connection | |
xhr.setRequestHeader("Content-type", |
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
<!-- Add this to the HEAD of the document --> | |
<script src="http://widgets.metabroadcast.com/loader/1/load.js"></script> | |
<script> | |
MBST = MBST || {}; | |
MBST.load({ | |
client: '*CLIENT*', // Replace this with the client name | |
widgets: [ | |
{ | |
name: 'epg', | |
version: '1' |
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
var getTabs = function(urlMatch, callback) { | |
var tabs = []; | |
chrome.tabs.query({ | |
status: 'complete' | |
}, function(results) { | |
for (var i = results.length; i--;) { | |
if (results[i].url.indexOf(urlMatch) !== -1) { | |
tabs.push(results[i].id); | |
} |
NewerOlder