Skip to content

Instantly share code, notes, and snippets.

@ajamaica
ajamaica / gist:3928304
Created October 21, 2012 20:02
Arreglar Montain Lion
Tienes que tener Xcode Pre instalado
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Bajar Command Line Tools de https://developer.apple.com/downloads/index.action#
Simlink a x11 : ln -s /opt/X11 /usr/X11
brew list
settings.py:
MEDIA_ROOT = 'C:/Server/Projects/project_name/static/'
MEDIA_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/media/'
urls.py:
from django.conf import settings

Ledger Nano X : Bluetooth Low Energy Communication

1.0

  • Public release

About

@ajamaica
ajamaica / web-servers.md
Created August 24, 2020 02:02 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

Keybase proof

I hereby claim:

  • I am ajamaica on github.
  • I am ajamaica (https://keybase.io/ajamaica) on keybase.
  • I have a public key whose fingerprint is 0372 0E83 FFF7 AA05 E537 D828 FA2D 63E3 45C2 BD8E

To claim this, I am signing this object:

@ajamaica
ajamaica / gist:5893344
Created June 30, 2013 01:03
UIInterpolatingMotionEffect
UIInterpolatingMotionEffect *mx = [[UIInterpolatingMotionEffect alloc]
initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis];
mx.maximumRelativeValue = @-39.0;
mx.minimumRelativeValue = @39.0;
UIInterpolatingMotionEffect *mx2 = [[UIInterpolatingMotionEffect alloc]
initWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis];
mx2.maximumRelativeValue = @-39.0;
mx2.minimumRelativeValue = @39.0;

Keybase proof

I hereby claim:

  • I am ajamaica on github.
  • I am ajamaica (https://keybase.io/ajamaica) on keybase.
  • I have a public key whose fingerprint is 9021 115C 215C 1F17 36E2 D338 14A5 450C 7363 D3D8

To claim this, I am signing this object:

curl -sL https://deb.nodesource.com/setup_5.x -o nodesource_setup.sh
sudo -E bash ./nodesource_setup.sh
sudo apt-get install -y nodejs build-essential git
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod start
git clone https://github.com/ParsePlatform/parse-server-example.git
@ajamaica
ajamaica / gist:1668839
Created January 24, 2012 08:28
Djando Deploy
# Instalación de paqueterias
sudo apt-get install libapache2-mod-wsgi
# Vamos a la carpeta
cd /etc/apache2
# Agregamos esta linea dentro del http.conf (site 1, site 2, depende la configuración de sus virtual host) Tiene que apuntar directo a un archivo .wsgi que tiene que estar preferente mente alado de la carpeta de su proyecto.
WSGIScriptAlias / /home/ajamaica/django.wsgi
@ajamaica
ajamaica / gist:a2a4d6ac2c783118d734
Last active January 18, 2016 16:07
Ransom Note
import string
#!/usr/bin/env python
def ransom_note(revistas,ransom):
catalogo = dict()
for letra in revistas:
if not letra in catalogo.keys():
catalogo[letra] = 1
else: