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() { | |
console.log('test'); | |
})(); |
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
license: mit |
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
license: mit |
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
license: mit |
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
license: mit |
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
using terms from application "Quicksilver" | |
on process text log_text | |
set theDate to (do shell script "date '+%A %d-%m-%Y'") | |
set theTime to (do shell script "date '+%H:%M'") | |
set theText to log_text | |
if (log_text is equal to "start") then | |
set theText to " | |
--- | |
" & theDate & " |
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
# get version of current kernel | |
uname -r | |
# get a list of the stored kernels | |
dpkg --list | grep linux-image | |
# remove an old kernel | |
sudo apt-get purge linux-image-x.x.x.x-generic | |
# update grub |
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
// Explicitly save/update a url parameter using HTML5's replaceState(). | |
function updateQueryStringParam (param, value) { | |
var baseUrl = [location.protocol, '//', location.host, location.pathname].join(''); | |
var urlQueryString = document.location.search; | |
var newParam = param + '=' + value; | |
var params = '?' + newParam; | |
// If the "search" string exists, then build params from it | |
if (urlQueryString) { | |
var keyRegex = new RegExp('([\?&])' + param + '[^&]*'); |
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
<!-- 1: First JavaScript snippet (Hello World Button) --> | |
<button id="mybutton">Click me</button> | |
<script> | |
$(document).ready(function() { | |
var button = document.getElementById("mybutton"); | |
button.addEventListener("click", function(event) { | |
alert("Hello World"); | |
}); | |
}); |
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
<!-- The HTML Page Stub --> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Hello World</title> | |
</head> | |
<body> | |
<!-- Content goes here --> | |
</body> |
NewerOlder