Skip to content

Instantly share code, notes, and snippets.

View paridin's full-sized avatar
🎯
Focusing

Roberto Estrada paridin

🎯
Focusing
View GitHub Profile
@paridin
paridin / reverse_phrase.py
Created July 2, 2016 22:05
Algorithms practice
#!/usr/bin/python
"""
Problem, Given a phrase, reverse every word preserving the order in the sentences
You could not use functions from the language.
Example
Input: Hello World From Mexico City
Output: olleH dlroW morF ocixeM ytiC
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember HABTM'
});
import JSONAPIAdapter from 'ember-data/adapters/json-api';
export default JSONAPIAdapter.extend({});
@paridin
paridin / adapters.application.js
Last active April 29, 2016 03:40
New Twiddle
import JSONAPIAdapter from 'ember-data/adapters/json-api';
export default JSONAPIAdapter.extend({});
@paridin
paridin / remove_large_list_of_files.sh
Created April 22, 2016 22:14
solve error ksh args list too long
# fix to error ksh: /usr/bin/ls: arg list too long
phrase='TD*.log' # or get by console $1
for i in `find . -name `$phrase``;
do
echo "Removing: $i";
rm -rf $i;
done
@paridin
paridin / tablas_verdad.py
Created November 12, 2015 05:48
Ejemplo para representar las tablas de verdad.
"""
Tablas de verdad en python
Replicaremos las tablas de la verdad de la siguiente tabla
https://images.duckduckgo.com/iu/?u=http%3A%2F%2Fhtml.rincondelvago.com%2F000264780.jpg&f=1
para la creación de las tablas para su representación gráfica utilizare pandas
tablas de verdad a programar AND, NAND, OR, NOR, EXOR
Desarrollado 11/11/15
Roberto Estrada
@paridin
paridin / install_py3.8.sh
Last active May 5, 2020 19:28
Simple script for installing python 3.8 on environments *.nix
#!/bin/bash
# Copyright (c) 2015-2019, Roberto Estrada
# All rights reserved.
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYR
@paridin
paridin / install_custom_vim_osx.md
Last active September 29, 2015 00:56
The easy way to pimp your vim on OSX

Installing a custom vim version

with support to python 3 and, a beautiful style on iterm2

I hope it helps you to pimp your vim, I try to make this guide as simple as possible, and you will need take a little effort to install vundle, this plugin is used to organize your plugins and its a default manager in vim awesome

font used in this custom

  • Terminus for powerline, You need Download and Double Click and install in your Font Book
@paridin
paridin / django_10_pasos.md
Last active September 14, 2015 16:48
Comienza a desarrollar profesionalmente con django en 10 pasos.

MAC OSX

1.- instalar brew, seguir los pasos de http://brew.sh/

2.- instalar python en su versión 3 apoyada por brew brew install python3

3.- instalar en la instancia de python 3 virtualenv y virtualenvwrapper

pip3 install virtualenv
pip3 install virtualenvwrapper
@paridin
paridin / guide_php_subdomain_a2hosting.md
Last active September 12, 2015 06:39
Allow PHP in a subdomain, after install a project django for domain in a2hosting

Guide

The problem, after install django project in my domain foo.net, i need install a limesurvey in a subdomain, using a2hosting

limesurvey.foo.net

  1. Create a subdomain using a cpanel limesurvey.foo.net
  2. Connect to account using ssh ssh -l user foo.net
  3. Download limesurvey and install it. https://www.limesurvey.com/ for more details
  4. Allow Cross Domain using .htaccess vi limesurvey/.htaccess