Skip to content

Instantly share code, notes, and snippets.

View Demieno's full-sized avatar

kamed Demieno

  • Odessa, Ukraine
View GitHub Profile
# добавить код в .bashrc или .zshrc in macOS
# удаляет все файлы .pyc и .pyo и каталоги __pycache__ - использовать команду в терминале в нужном проекте —> pyclean
pyclean () {
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
}
@Demieno
Demieno / clojure.md
Created March 22, 2018 19:38
Setting Up Clojure on OS X

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

I appreciate the effort you've put into documenting this, but there are a number of inaccuracies here that need to be addressed. We get

@Demieno
Demieno / Generating_password.js
Last active January 31, 2018 21:14
Generating a password of a given length
function generate(len)
{
var ints =[0,1,2,3,4,5,6,7,8,9];
var chars=['A','a','B','b','C','c','D','d','E','e','F','f','G','g','H','h','J','j','K','k','L','l','M','m','N','n','O','o','P','p','R','r','S','s','T','t','U','u','V','v','W','w','X','x','Y','y','Z','z'];
var out='';
for(var i=0;i<len;i++){
var ch=Math.random(1,2);
if(ch<0.5){
var ch2=Math.ceil(Math.random(1,ints.length-1)*10);
if(ints[ch2] !== undefined){