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/sh | |
# Install brew | |
xcode-select --install | |
http://xquartz.macosforge.org/landing/ | |
http://support.apple.com/kb/DL1572 |
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
from turtle import * | |
import math | |
class MyTurtle(Turtle): | |
def rectangle(self,a,b): | |
self.fd(a) | |
self.lt(90) | |
self.fd(b) | |
self.lt(90) | |
self.fd(a) | |
self.lt(90) |
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
#!/usr/bin/env sh | |
# Install new vim | |
sudo apt-get build-dep vim | |
unzip vim-master.zip | |
cd vim-master | |
make | |
sudo make install | |
hash -r | |
vim --version |
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
window.location.search.substr(1).split('&').map(value => { | |
return value.split('=')[1]; | |
}).filter(value => { | |
const parser = document.createElement('a'); | |
parser.href = value; | |
return parser.protocol === "javascript:"; | |
}).length; |
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 for checking array of words for anagrams | |
* @param {Array} words Array of words | |
* @return {Array} Array of arrays with anagram words | |
*/ | |
const anagram = words => words.reduce((result, word) => { | |
if (!result[word.length]) { | |
result[word.length] = [word]; | |
} | |
else { |
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 sum(x) { | |
const f = y => sum(x + y); | |
f.valueOf = () => x; | |
return f; | |
} |
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 for translitirating cyrillic to latin | |
* @param {String} word Word on cyrillic | |
* @return {String} Word translitirated to latin | |
*/ | |
const translitCyrillicToLatin = word => { | |
const translitMap = { | |
'а': 'a', | |
'б': 'b', | |
'в': 'v', |
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 for translitirating latin to cyrillic | |
* @param {String} word Word on latin | |
* @return {String} Word translitirated to cyrillic | |
*/ | |
const translitLatinToCyrillic = word => { | |
const translitMap = { | |
'a': 'а', | |
'b': 'б', | |
'c': 'ц', |
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 for converting keyboard keys from latin to cyrillic | |
* @param {String} word Word on latin | |
* @return {String} Word converted to cyrillic | |
*/ | |
const convertKeyboardKeysLatinToCyrillic = word => { | |
const keyboardMap = { | |
'a': 'ф', | |
'b': 'и', | |
'c': 'c', |
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 for converting keyboard keys from cyrillic to latin | |
* @param {String} word Word on cyrillic | |
* @return {String} Word converted to latin | |
*/ | |
const convertKeyboardKeysCyrillicToLatin = word => { | |
const keyboardMap = { | |
'ф': 'a', | |
'и': 'b', | |
'c': 'c', |
OlderNewer