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
#Mounting the share is a 2 stage process: | |
# 1. Create a directory that will be the mount point | |
# 2. Mount the share to that directory | |
#Create the mount point: | |
mkdir share_name | |
#Mount the share: | |
mount_smbfs //username:[email protected]/share_name share_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
/********************************************************** | |
* Hack to fix datepicker issue in IE. | |
* | |
* https://gist.github.com/sinelaw/5416130 | |
********************************************************** | |
* | |
* After jquery ui datepicker selection, blur and change | |
* events fire before focus is returned to the input field, | |
* handling a quirk from IE browsers | |
*/ |
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
user - имя пользователя | |
server.timeweb.ru - сервер | |
1. На машине ssh-keygen -t rsa | |
2. Копируем, можно по FTP или одной из команд | |
2.1. ssh-copy-id -i ~/.ssh/id_rsa [email protected] | |
2.2. scp ~/.ssh/id_rsa.pub [email protected]:~ | |
3. На сервере | |
[ -d ~/.ssh ] || (mkdir ~/.ssh; chmod 711 ~/.ssh) # создание директории и изменение прав | |
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys # добавление открытого ключа |
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 pDate() { | |
- return new Date().getTime(); | |
- } | |
doctype html | |
html(lang="ru") | |
head | |
meta(charset="utf-8") | |
title TITLE |
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. Visit a news website like cnn.com | |
// 2. paste this into your console | |
setInterval(() => | |
document.querySelectorAll('p,img,a,button,h1,h2,h3,span') | |
.forEach(x=>x.style=`transform:rotate(${Math.random()*777}deg) scale(${Math.random()* 3}); transition:all .5s`) | |
, 500); | |
// 3. feel a lil bit better 😘 |
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
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
const axios = require('axios'); // promised based requests - like fetch() | |
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
}); | |
} |
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
// On PhpStorm, when ussing with laravel mix, for Alias path resolving in components you have to: | |
// - create a webpack.config.js file separately like: | |
const path = require('path') | |
const webpack = require('webpack') | |
module.exports = { | |
... | |
resolve: { | |
extensions: ['.js', '.json', '.vue'], |
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
on run {input, parameters} | |
set phrase to input as string | |
set phrase to quoted form of phrase | |
set ui_lang to "ru" | |
set from_lang to "auto" | |
set to_lang to "ru" | |
do shell script "open 'https://translate.google.com/?hl='" & ui_lang & "'&sl='" & from_lang & "'&tl='" & to_lang & "'&text='" & phrase | |
end run |