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 / settings.py
Created May 25, 2015 01:20
Full django-ckeditor configuration.
#CKEditor Options
CKEDITOR_UPLOAD_PATH = "/statics/media/uploads/"
CKEDITOR_IMAGE_BACKEND = "pillow"
CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
CKEDITOR_CONFIGS = {
'default': {
'skin': 'office2013',
'toolbar': [
{ 'name': 'document', 'groups': [ 'mode', 'document', 'doctools' ], 'items': [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
@SalahAdDin
SalahAdDin / boards.cpp
Created May 30, 2015 20:53
Problema de los tableros.
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <stack>
#include <algorithm>
using namespace std;
struct Node {
int tablero;
int origin;
@SalahAdDin
SalahAdDin / hallo-custombuttons.js
Last active August 29, 2015 14:22
Custom simple blockquote buttons for hallo.js
(function () {
(function (jQuery) {
return jQuery.widget("IKS.blockquotebutton", {
options: {
editable: null,
toolbar: null,
uuid: '',
quotes: {
blockquotebutton: true,
blockquotebuttonwithclass: true,
@SalahAdDin
SalahAdDin / hallo-custombuttons.js
Last active August 29, 2015 14:22
Advance custom plugin.
(function () {
(function (jQuery) {
return jQuery.widget("IKS.blockquote", {
options: {
editable: null,
toolbar: null,
uuid: '',
quotes: {
blockquotebutton: true,
blockquotebuttonwithclass: true,
@SalahAdDin
SalahAdDin / fancybox-buttons.scss
Created June 27, 2015 00:44
Sass support for Fancybox.
//Auxiliar Functions
@function parseInt($n) {
@return $n / ($n * 0 + 1);
}
$base-size: 16;
@mixin rem($property, $values) {
$px: ();
@SalahAdDin
SalahAdDin / Tutorial.txt
Created August 13, 2015 15:09
Installing and configuring Wagtail in WebFaction Server
Deploy Wagtail in Webfaction it's very easy if you know how do it, well, now is much easier,
Wagtail have now a compiled css files, but, is you want use sass files yet, you can follow the next steps.
In web faction you need to do three aditional steps from a normal webfaction django's deploying:
Install gcc>=4.6, compile and install libsass and use compress comamand in static files.
So, now we'll see each step clearer:
1. Install gcc>= 4.6:
You can find how do this here: https://community.webfaction.com/questions/6921/compiling-gcc-46.
@SalahAdDin
SalahAdDin / algorithms.py
Last active September 9, 2015 05:24
First project for Crypto
from fractions import gcd
from source import *
__author__ = 'tulipan'
def vigenere(decode, key, clear):
encrypted = []
@SalahAdDin
SalahAdDin / Fixes
Last active March 6, 2016 02:28
Many fixes for many problemas.
When did you installed contents for MODO 902 in alternative folder, not default folder, you can do this:
cd ~/modo/
export NEXUS_CONTENT=~/<Alternative Folder>/Content/
./modo
Note: This fix couldn't fixed this problem when you create a desktop launcher, so, is better install the content in the default repository.
If you try install the Foundry crack and RLM doesn't stop, kill rlm.foundry since System's Monitors.
@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 / _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;