Skip to content

Instantly share code, notes, and snippets.

View SalahAdDin's full-sized avatar
🎯
Focusing

José Luis SalahAdDin

🎯
Focusing
View GitHub Profile
@SalahAdDin
SalahAdDin / geo_tags.py
Created April 4, 2017 08:09
Trying to make a custom template tag.
import logging
import re
import requests
from django.conf import settings
from django.template import Library
from django.template import Node
from django.template import TemplateSyntaxError
from django.utils.html import format_html_join
@SalahAdDin
SalahAdDin / dev-server.js
Last active March 20, 2017 11:32
Configuration
// Creates a hot reloading development environment
const path = require('path');
const express = require('express');
const webpack = require('webpack');
const webpackDevMiddleware = require('webpack-dev-middleware');
const webpackHotMiddleware = require('webpack-hot-middleware');
const DashboardPlugin = require('webpack-dashboard/plugin');
const config = require('./config/webpack.config.development');
@SalahAdDin
SalahAdDin / Commands.md
Last active January 16, 2018 16:09
Supply EC2 instances for works with Docker

NOTE: For install all docker: curl -sSL https://get.docker.com | sh.

  1. Update the system and prepare requirements:
    $ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    $ sudo apt-get update && sudo apt-get upgrade && sudo apt-get install apt-transport-https ca-certificates git  
    $ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
  1. Open next file and clean it:
    $ sudo nano /etc/apt/sources.list.d/docker.list
  2. Add proper source list, in this case Ubuntu 16.04 server, save and close:
@SalahAdDin
SalahAdDin / DockerFile
Created September 17, 2016 23:56
Django + Docker + Postgres + ElasticSearch + Redis recipe
FROM python:3.5.2
RUN apt-get update \
&& apt-get install -y gettext curl sudo \
&& curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - \
&& apt-get install -y nodejs \
&& apt-get install -y libpng-dev libtiff5-dev libjpeg62-turbo-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk \
libopenjpeg-dev pngquant libmagickwand-dev imagemagick \
&& apt-get autoremove -y --purge \
@SalahAdDin
SalahAdDin / Instructions.md
Created August 9, 2016 05:58
Installing elasticsearch in Antergos

Install ElasticSearch in Antergos require the next steps:

  1. Install from community repository: sudo pacman -S elasticsearch
  2. Enable ElasticSearch service: sudo systemctl enable elasticsearch
  3. Start ElasticSearch service: sudo systemctl start elasticsearch
  4. Some tweaks configuration:
    a. Change local networks:
    • Open config file: sudo vi /etc/elasticsearch/elasticsearch.yml
    • Uncomment and change this line: network.host: localhost
      b. Enable cross origin acces:
@SalahAdDin
SalahAdDin / Steps.md
Last active May 29, 2022 06:11
Instlling React-Native Android Environment in ArchLinux

First step: Install Android SDK

  1. yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools
    Note: Maybe you'll have problems with the lasta package: ncurses5-compat-libs. In order to avoid this problem you have to use this command: gpg --recv-keys F7E48EDB. You can find clarification here.
  2. yaourt -S genymotion
    Note: You'll need install virtual-box and his modules, yaourt will make for you but you need choos between ArchLinux host modules or DKMS host modules.
  3. Enter in super user mode with su - and then do echo -e "vboxdrv\nvboxnetflt\nvboxnetadp\nvboxpci" > /etc/modules-load.d/virtualbox.conf
    Note: You need do this with super user because need super user permissions and with sudo, for us at least, doesn't work.
  4. sudo modprobe vboxdrv vboxnetadp vboxnetflt
    Activate for current session.
  5. sudo chmod -R 777 /opt/android-sdk
http://www.twcenter.net/forums/showthread.php?682245-MOD-RELEASED-Rebell-s-Emergent-factions-reworked-!
http://www.twcenter.net/forums/showthread.php?680789-More-Meaningful-Seasons
http://www.twcenter.net/forums/showthread.php?680806-Dictator-s-Mods-(7-mods
http://www.twcenter.net/forums/showthread.php?680665-Occupation-and-Diplomatic-Options-(Confederations-etc-
http://www.twcenter.net/forums/showthread.php?710364-The-plans-for-1-7-(-Its-going-again-)/page4
http://www.twcenter.net/forums/showthread.php?721931-Marca-Hispanica-AoC-1-2-(Updated-23-03-2016)&highlight=Cordoba
http://www.twcenter.net/forums/showthread.php?683993-Rome-2-total-war-Surena-Epic-2-(Released-22-Apirl-2016-The-Global-Version)
@SalahAdDin
SalahAdDin / _date-dropper.scss
Last active June 24, 2016 22:44
Arreglos para time y date dropper.
//colors
$black_5: rgba(0,0,0,0.05);
$color_lochmara_approx: #08c;
$color_mine_shaft_approx: #333;
$color_lochmara_45_approx: rgba(0, 136, 204, 0.45);
$white: #ffffff;
$color_pattens_blue_approx: #e3f2fa;
//fonts
$font_0: dd-icon;
@SalahAdDin
SalahAdDin / webpack.babel.config,js
Created April 26, 2016 01:52
Django jet statics compiler config.
var fs = require('fs');
var path = require('path');
var webpack = require('webpack');
var autoprefixer = require('autoprefixer');
var COMMON_SCSS_PATH = './scss';
var COMMON_CSS_PATH = './css';
/*
function fileList(dir) {
@SalahAdDin
SalahAdDin / Installing Arch Linux
Last active May 16, 2019 13:40
Custom arch linux installation
sudo pacman -Syyu
sudo pacman -S noto-fonts-emoji docker python-pip python-virtualenv python-numpy vlc variety inkscape krita linux-headers nodejs npm opera nginx postgresql pgadmin4 postgresql-old-upgrade postgresql-docs postgresql-libs elasticsearch clang ttf-aboriginal-sans
sudo pacman -S llvm firefox-i18n-es-mx firefox-i18n-es-ar firefox-i18n-tr wxpython openmp ttf-freefont lua-socket tk sane
sudo pacman -S postgis gdal hdf5 libreoffice-extension-writer2latex libreoffice-extension-texmaths libreoffice-fresh-ar libreoffice-fresh-eu libreoffice-fresh-tr yarn yay code opencv
yay -S hunspell-tr hunspell-ar rar libreoffice-extension-libregreek libreoffice-extension-dictionaries-es libreoffice-extension-languagetool libreoffice-extension-writer2epub spotify kitekatic gitkraken
sudo pacman -S noto-fonts-emoji deepin-voice-recorder deepin-grub2-themes docker zsh opera-ffmpeg-codecs python-pip python-virtualenv vlc variety neofetch inkscape krita 0ad gedit-plugins gparted linux-headers 0ad-data nodejs npm oper