Skip to content

Instantly share code, notes, and snippets.

@grinat
grinat / nvidia.md
Created May 20, 2018 21:38 — forked from cavinsmith/nvidia.md
Nvidia GPUs sorted by CUDA cores

List of desktop Nvidia GPUS ordered by CUDA core count

I created it for those who use Neural Style

Guys, please add your hardware setups, neural-style configs and results in comments!

GPU CUDA cores Memory Processor frequency
GeForce GTX TITAN Z 5760 12 GB 705 / 876
@grinat
grinat / writeStylesToAttribute.js
Last active May 17, 2018 09:13
writeStyleToAttr
const writeStylesToAttribute = (selectorsArray, attribute = 'style') => {
selectorsArray.forEach(selector => {
for (let el of document.querySelectorAll(selector)) {
let cS = getComputedStyle(el)
let style = ''
for (let propName in cS) {
if (isNaN(propName)) {
style += `${propName}:${cS[propName]};`
}
}
@grinat
grinat / create_n_copy_ssh_key.sh
Created May 11, 2018 07:13
Create and copy new ssh key
# gen key
ssh-keygen -t rsa
# pust pub key to remote server
cat ~/.ssh/id_rsa.pub | ssh developers@172.19.110.90 -p2265 "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys"
@grinat
grinat / gist:7dc5f80b7dfa806e830daeb4e3a2090a
Last active April 28, 2018 15:46 — forked from vladimirtsyupko/gist:10964772
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/prod
git pull