Skip to content

Instantly share code, notes, and snippets.

Amirhossein Aleyasen Aleyasen

View GitHub Profile
View GameConfig.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.aale.samuraisiegehackmaven;
import java.util.HashMap;
import java.util.Map;
View SVV_COLUMNS
( SELECT current_database()::character varying(128) AS table_catalog, nc.nspname::character varying(128) AS table_schema, c.relname::character varying(128) AS table_name, a.attname::character varying(128) AS column_name, a.attnum::integer AS ordinal_position,
CASE
WHEN u.usename = "current_user"()::name THEN ad.adsrc::character varying(4000)
ELSE NULL::character varying::character varying(4000)
END AS column_default,
CASE
WHEN a.attnotnull OR t.typtype = 'd'::"char" AND t.typnotnull THEN 'NO'::character varying
ELSE 'YES'::character varying
END AS is_nullable,
CASE
@Aleyasen
Aleyasen / github.md
Last active Jan 28, 2019
Use Github API to make daily Github administration routines much easier! (especially if you/your company has a lot of repositories)
View github.md

You need ok.sh (https://github.com/whiteinge/ok.sh) and JQ (http://stedolan.github.io/jq) to use these snippets.

  • Delete a collaborator from all of your repositories (e.g. in case a developer left the company)
ok.sh -j list_repos | jq -r -c '.[] | "\(.full_name)"' | xargs -I % sh -c './ok.sh -y delete_collaborator % [USERNAME]'
View docker exec ...
docker run \
> -d \
> -p 80:80 \
> --name saas-nginx \
> --network=odoo-saas \
> -t itprojectsllc/docker-odoo-nginx
Unable to find image 'itprojectsllc/docker-odoo-nginx:latest' locally
latest: Pulling from itprojectsllc/docker-odoo-nginx
43c265008fae: Pull complete
e4c030a565b1: Pull complete
View gist:3dd9559dd5ca22cd5f73c6765ccf0326
[options]
addons_path = /mnt/odoo-source/odoo/addons,/mnt/odoo-source/addons,/mnt/addons/OCA/account-closing,/mnt/addons/OCA/account-financial-reporting,/mnt/addons/OCA/account-financial-tools,/mnt/addons/OCA/account-invoicing,/mnt/addons/OCA/bank-payment,/mnt/addons/OCA/bank-statement-import,/mnt/addons/OCA/bank-statement-reconcile,/mnt/addons/OCA/commission,/mnt/addons/OCA/contract,/mnt/addons/OCA/event,/mnt/addons/OCA/hr,/mnt/addons/OCA/partner-contact,/mnt/addons/OCA/pos,/mnt/addons/OCA/reporting-engine,/mnt/addons/OCA/rma,/mnt/addons/OCA/sale-workflow,/mnt/addons/OCA/server-tools,/mnt/addons/OCA/web,/mnt/addons/OCA/website,/mnt/addons/it-projects-llc/access-addons,/mnt/addons/it-projects-llc/e-commerce,/mnt/addons/it-projects-llc/mail-addons,/mnt/addons/it-projects-llc/misc-addons,/mnt/addons/it-projects-llc/odoo-saas-tools,/mnt/addons/it-projects-llc/odoo-telegram,/mnt/addons/it-projects-llc/pos-addons,/mnt/addons/it-projects-llc/website-addons
admin_passwd = admin
data_dir=/mnt/data-dir
dbfilter = ^%d$
View gist:677ef0b26a4d7118997919439d3ee2bd
import regex as re
import string
def translate_non_alphanumerics(to_translate, translate_to=u'_'):
not_letters_or_digits = u'!"#%\'()*+,-./:;<=>?@[\]^_`{|}~٫،؛'
translate_table = dict((ord(char), translate_to) for char in not_letters_or_digits)
return to_translate.translate(translate_table)
@Aleyasen
Aleyasen / temperatureCircle.py
Created Aug 6, 2017 — forked from anttilipp/temperatureCircle.py
Code to reproduce the "Temperature Circle" visualization.
View temperatureCircle.py
#
# Hi all,
# this is the Python code I used to make the visualization "Temperature circle"
# (https://twitter.com/anttilip/status/892318734244884480).
# Please be aware that originally I wrote this for my tests only so the
# code was not ment to be published and is a mess and has no comments.
# Feel free to improve, modify, do whatever you want with it. If you decide
# to use the code, make an improved version of it, or it is useful for you
# in some another way I would be happy to know about it. You can contact me
# for example in Twitter (@anttilip). Unchecked demo data (no quarantees)
View error.log
jquery.js:3855 Uncaught Error: [$injector:modulerr] Failed to instantiate module fuse due to:
Error: [$injector:modulerr] Failed to instantiate module elasticsearch due to:
Error: [$injector:nomod] Module 'elasticsearch' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.6.4/$injector/nomod?p0=elasticsearch
at http://localhost:3000/bower_components/angular/angular.js:66:12
at http://localhost:3000/bower_components/angular/angular.js:2262:17
at ensure (http://localhost:3000/bower_components/angular/angular.js:2183:38)
at module (http://localhost:3000/bower_components/angular/angular.js:2260:14)
at http://localhost:3000/bower_components/angular/angular.js:4896:22
at forEach (http://localhost:3000/bower_components/angular/angular.js:403:20)
View e-commerce.module.js
(function()
{
'use strict';
angular
.module('app.e-commerce',
[
// 3rd Party Dependencies
'wipImageZoom',
'datatables',
View index.module.js
(function ()
{
'use strict';
/**
* Main module of the Fuse
*/
angular
.module('fuse', [
You can’t perform that action at this time.