Skip to content

Instantly share code, notes, and snippets.

View cansadadeserfeliz's full-sized avatar

Vera cansadadeserfeliz

  • Desparchado.co
  • Bogotá
View GitHub Profile
@Tamal
Tamal / git-ssh-error-fix.sh
Last active April 16, 2024 13:32
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
@rj76
rj76 / run_tests.sh
Last active July 28, 2016 09:07
Run Django tests and let espeak playout the result
#/bin/bash
convertsecs() {
((h=${1}/3600))
((m=(${1}%3600)/60))
((s=${1}%60))
printf "Tests took %02d hours, %02d minutes, %02d seconds...\n" $h $m $s
}
env python manage.py test --settings settings.test_settings $1 2> logs/test_stderr.log
@beshkenadze
beshkenadze / react_tz.md
Last active December 21, 2023 18:22
Тестовое задание для ReactJS Frontend-разработчика

##Погодное одностраничное веб-приложение

(!) Данные можно взять с сайта openweathermap.org или с любого другого сервиса.

(!) Обязательно использовать react.js и redux.

Приложение должно уметь:

  • Добавлять/удалять города
  • Сохранять локально данные

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@scabbiaza
scabbiaza / README.md
Created September 22, 2014 18:29
Flask with infinity scroll navigation

Flask with infinity scroll navigation

Using: Flask, SQLAlchemy, Infinite-scroll

@cansadadeserfeliz
cansadadeserfeliz / keygen.sh
Last active August 29, 2015 14:00
generate a new ssh key
# generate a new key
ssh-keygen -t rsa -b 4096 -f ~/.ssh/my_key
# private key
cat ~/.ssh/my_key
# public key
cat ~/.ssh/my_key.pub
# add key
ssh-add ~/.ssh/my_key
@cansadadeserfeliz
cansadadeserfeliz / gist:9923987
Last active August 29, 2015 13:57
Install Pillow or pyOpenSSL in MAC
export CPPFLAGS=-Qunused-arguments
export CFLAGS=-Qunused-arguments
brew install libjpeg
#pip install Pillow
#pip install pyOpenSSL
# Installation: https://help.ubuntu.com/community/PostgreSQL
# Creating a user: http://stackoverflow.com/questions/11919391/postgresql-error-fatal-role-username-does-not-exist
# Set password: http://stackoverflow.com/a/7696398/914332
# make dump of existing database
$ pg_dump -O -U postgres database_name | gzip > /tmp/dump.sql.gz
# create dump without data
$ pg_dump test_db_development -s > /tmp/createdb.sql
@guilherme
guilherme / gist:9604324
Last active February 24, 2024 20:39
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then