Skip to content

Instantly share code, notes, and snippets.

Avatar

Lattapon Yodsuwan clozed2u

View GitHub Profile
@renatorib
renatorib / operator_with_ligatures.md
Last active Nov 21, 2019
Using Operator Mono with Fira Code ligatures in Atom.
View operator_with_ligatures.md

Using Operator Mono with Fira Code ligatures in Atom.

  1. Open your Atom's Stylesheet
    image

  2. Put this css

atom-text-editor {
  text-rendering: optimizeLegibility;
 -webkit-font-smoothing: antialiased;
@DeLaGuardo
DeLaGuardo / pragmatapro-font-lock-symbols-v2.el
Last active Jun 30, 2021
Snippet for support ligatures from PragmataPro font in Emacs
View pragmatapro-font-lock-symbols-v2.el
;; Enable ligatures without prettify-symbols
(provide 'add-pragmatapro-symbol-keywords)
(defconst pragmatapro-fontlock-keywords-alist
(mapcar (lambda (regex-char-pair)
`(,(car regex-char-pair)
(0 (prog1 ()
(compose-region (match-beginning 1)
(match-end 1)
@anoochit
anoochit / gogs.sh
Created Mar 15, 2016
gogs.sh config gogs with nginx
View gogs.sh
APP_NAME="gogs"
MYSQL_PASSWORD="change_me"
HOSTNAME="example.com"
# setup mysql server and database
debconf-set-selections <<CONFIG
mysql-server-5.5 mysql-server/root_password password ${MYSQL_PASSWORD}
mysql-server-5.5 mysql-server/root_password_again password ${MYSQL_PASSWORD}
CONFIG
apt-get install -y --force-yes mysql-server
@tam7t
tam7t / docker-compose.yml
Last active May 18, 2017
drone-gogs compose
View docker-compose.yml
gogs:
image: gogs/gogs:latest
ports:
- "3000:3000"
- "10022:22"
volumes:
- ./data:/data
drone:
image: drone/drone:0.4
# build: .
@mgreau
mgreau / Gogs-Docker.adoc
Last active Aug 14, 2019
Gogs Docker Env (docker-compose)
View Gogs-Docker.adoc

Replace 192.168.99.100 by your DOCKER_HOST IP

# Configure the server
curl 'http://192.168.99.100:3000/install' \
  -H 'Origin: null' -H 'Accept-Encoding: gzip, deflate' \
  -H 'Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4' \
  -H 'Upgrade-Insecure-Requests: 1' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36' \
@halberom
halberom / opt1_template.j2
Last active Feb 18, 2022
ansible - example of template if else
View opt1_template.j2
{# style 1 - long form #}
{% if filepath == '/var/opt/tomcat_1' %}
{% set tomcat_value = tomcat_1_value %}
{% else %}
{% set tomcat_value = tomcat_2_value %}
{% endif %}
{# style 2 - short form #}
{% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %}
@ianblenke
ianblenke / es_pri_allocate_unassigned.md
Last active Nov 18, 2021
elasticsearch trying to allocate a primary shard which is disabled
View es_pri_allocate_unassigned.md

Allow routing allocations:

curl -XPUT localhost:9200/_cluster/settings -d '{
                "transient" : {
                    "cluster.routing.allocation.enable" : "all"
                }
        }'
View essential-javascript-links.md