Skip to content

Instantly share code, notes, and snippets.

View chalist's full-sized avatar
🏠
Working from home

Chalist chalist

🏠
Working from home
View GitHub Profile
@chalist
chalist / package.json
Created February 13, 2019 03:56
pckage.json for coompile and lint scss files and minify css, lint and minify js, inject css with browserSync and watch files
{
"name": "bookism",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"scss": "node-sass --output-style compressed --watch src/scss -o dist/css",
"serve": "browser-sync start --proxy 0.0.0.0:9999 --files 'dist/css/*.css'",
"clean": "rimraf dist/{css/*,js/*}",
"lint": "eslint src/js || true",
{"lastUpload":"2020-12-23T15:20:36.766Z","extensionVersion":"v3.4.3"}
@chalist
chalist / mimeapps.list.md
Last active September 10, 2020 06:49
Set linux default browser in Linux

I set it in /usr/share/applications/defaults.list and it worked for me (opening links from the Slack app). Indeed, the list of available applications is /usr/share/applications/\*.desktop.

This can probably also be done per-user in ~/.config/mimeapps.list

These lines had to be edited in my case:

text/html=firefox.desktop;
text/xml=firefox.desktop;
# =========================== i3 config ================================
# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod4
# set default desktop layout (default is tiling)
# workspace_layout tabbed <stacking|tabbed>
@chalist
chalist / cloudSettings
Last active November 25, 2019 12:05
cloudSettings
test
@chalist
chalist / .vimrc
Created September 25, 2019 13:32 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@chalist
chalist / cloudSettings
Created September 22, 2019 08:50
cloudSettings
cloudSettings
// my little html string builder
buildHTML = function(tag, html, attrs) {
// you can skip html param
if (typeof(html) != 'string') {
attrs = html;
html = null;
}
var h = '<' + tag;
for (attr in attrs) {
if(attrs[attr] === false) continue;
@chalist
chalist / Tmux config
Last active October 25, 2018 12:39
tmux config with powerline
# use UTF8
set -g utf8
set-window-option -g utf8 on
set -g status on
set -g status-utf8 on
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
@chalist
chalist / iran_cities.json
Created April 7, 2018 17:37
Iran states and cities in json file.
{
"اردبیل": ["اردبیل","اصلاندوز","آبی بیگلو","بیله سوار","پارس آباد","تازه کند","تازه کندانگوت","جعفرآباد","خلخال","رضی","سرعین","عنبران","فخرآباد","کلور","کوراییم","گرمی","گیوی","لاهرود","مرادلو","مشگین شهر","نمین","نیر","هشتجین","هیر"],
"اصفهان": ["ابریشم", "ابوزیدآباد", "اردستان", "اژیه", "اصفهان", "افوس", "انارک", "ایمانشهر", "آران وبیدگل", "بادرود", "باغ بهادران", "بافران", "برزک", "برف انبار", "بوئین ومیاندشت", "بهاران شهر", "بهارستان", "پیربکران", "تودشک", "تیران", "جندق", "جوزدان", "جوشقان وکامو", "چادگان", "چرمهین", "چمگردان", "حبیب آباد", "حسن آباد", "حنا", "خالدآباد", "خمینی شهر", "خوانسار", "خور", "خوراسگان", "خورزوق", "داران", "دامنه", "درچه پیاز", "دستگرد", "دولت آباد", "دهاقان", "دهق", "دیزیچه", "رزوه", "رضوانشهر", "زاینده رود", "زرین شهر", "زواره", "زیباشهر", "سده لنجان", "سفیدشهر", "سگزی", "سمیرم", "شاپورآباد", "شاهین شهر", "شهرضا", "طالخونچه", "عسگران", "علویچه", "فرخی", "فریدونشهر", "فلاورجان", "فولادشهر", "قمصر", "قهجاورستان", "قهدریجان", "کاشان", "کرکوند", "کلیشادوسودرجان", "کمشچه", "کمه"