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
/** | |
* Read Linux mouse(s) in node.js | |
* Author: Marc Loehe (marcloehe@gmail.com) | |
* | |
* Adapted from Tim Caswell's nice solution to read a linux joystick | |
* http://nodebits.org/linux-joystick | |
* https://github.com/nodebits/linux-joystick | |
*/ | |
var fs = require('fs'), |
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
#!/bin/bash | |
sudo apt-get install -y apt-transport-https | |
sudo apt-get install -y curl | |
sudo apt-get install -y vim | |
sudo apt-get install -y vim | |
sudo apt-get install -y apache2 | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y autoconf |
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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"draw_white_space": "all", | |
"font_size": 13, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Vintage" |
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
xdotool mousemove --sync 1900 50 | |
xdotool getactivewindow click 1 | |
sleep 1 | |
xdotool mousemove --sync 1900 20 | |
xdotool getactivewindow click 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
(function(){ | |
var blockContextMenu, element, | |
blockContextMenu = function (event){ | |
event.preventDefault(); | |
} | |
element = document.body; | |
element.addEventListener('contextmenu', blockContextMenu); | |
})(); |
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
// Usage: | |
// node scale-crop.js infile zoom translate_x translate_y rotation outfile | |
'use strict'; | |
var gm = require('gm'); | |
var args = process.argv.slice(2); | |
console.log(args); | |
var infile = args[0]; |
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
// You'll need to download i18n as well as jquery | |
// http://i18next.com/ | |
// https://jquery.com/download/ | |
$(document).ready(function(){ | |
i18n.init({ lng: 'en-EN', load: 'current', fallbackLng: false }, function(t) { | |
$('[data-i18n]').i18n(); | |
}); | |
}); |
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
<snippet> | |
<content><![CDATA[console.log('$TM_FILENAME - $0');]]></content> | |
<tabTrigger>jslog</tabTrigger> | |
<scope>source.js</scope> | |
</snippet> |
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() { | |
var scene, camera, renderer; | |
var geometry, material, mesh; | |
init(); | |
animate(); | |
function init() { | |
scene = new THREE.Scene(); |
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
i18n.init({ lng: 'en-EN', load: 'current', fallbackLng: false }, function(t) { | |
var keys = document.querySelectorAll('[data-i18n]'); | |
for (var i = 0; i < keys.length; i++) { | |
var key = keys[i].dataset.i18n; | |
var attribute = null; | |
var attributeRegEx = new RegExp(/\[(\S*)\]/); | |
if(key.match(attributeRegEx)){ | |
attribute = key.match(attributeRegEx)[1]; | |
key = key.replace(attributeRegEx, ''); |
OlderNewer