Fix hanging HGFS: Read more here
echo "answer AUTO_KMODS_ENABLED yes" | sudo tee -a /etc/vmware-tools/locations
function add(num1, num2) { | |
num1 = num1.split(''); | |
num2 = num2.split(''); | |
num1 = num1.map(function (num) { | |
return parseInt(num, 10); | |
}); | |
num2 = num2.map(function (num) { | |
return parseInt(num, 10); |
Lentil Recipe | |
1. Add Lentils and Chicken Broth + Water to large pot | |
(3-to-1 ratio of broth to lentils, more or less) | |
2. Put on stove on high with lentil/broth combo. | |
3. As the pot is heating up, prepare the following: |
function getElementsByClassName(className) { | |
var elements = document.body, | |
matches = []; | |
function traverse(node) { | |
for(var i = 0; i < node.childNodes.length; i++) { | |
if(node.childNodes[i].childNodes.length > 0) { | |
traverse(node.childNodes[i]); | |
} | |
Fix hanging HGFS: Read more here
echo "answer AUTO_KMODS_ENABLED yes" | sudo tee -a /etc/vmware-tools/locations
Turn the radio on | |
GO to menu item #40 and RESET the radio | |
Menu item #14 for either English voice or Voice OFF | |
Press EXIT on the keypad | |
Push orange VFO/MR button to go to Frequency mode and program in repeater frequency | |
Press MENU then push #1 for frequency stepping. 10K for ham repeater use. | |
Push #13 for CTCSS on transmit for repeater use. | |
Push #25 for repeater shift. Options are NEG(-) POS(+) or off for simplex | |
Item #26 for off shift repeater use. You want 00.600 for ham radio repeaters. |
# This is a dump of the word list | |
text = File.read ARGV[0] | |
words = text.split("\n") | |
hash = {} | |
words.each do |word| | |
word.each_char do |l| | |
hash[l] ||= 0 | |
if hash.keys.include?(l) | |
hash[l] += 1 |
#!/usr/bin/ruby | |
# Group all words that are anagrams of one another | |
# example: | |
# sample set of words | |
# dict = %w[cat tar war store core orb bro rat] | |
# $ ruby anagram.rb | |
# expect | |
# { | |
# "act"=>["cat"], |
class Node | |
attr_accessor :next, :data | |
def push(str) | |
new_node= Node.new | |
new_node.data = str | |
node = self | |
while node.next |
function retina(selector) { | |
var element = document.querySelector(selector); | |
var images = Array.prototype.slice.apply(element.getElementsByTagName("img")); | |
var extension = "_2x"; | |
if (window.devicePixelRatio === 2) { | |
images.forEach(function(img, idx) { | |
var src = img.getAttribute('src'); | |
img.setAttribute('src', src.replace(/(\.jpg|\.png|\.gif)$/, extension + '$&')); | |
img.onerror = function(evt) { | |
img.setAttribute('src', src); |