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
// 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 / cloudSettings
Created September 22, 2019 08:50
cloudSettings
cloudSettings
@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
Last active November 25, 2019 12:05
cloudSettings
test
# =========================== 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 / 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;
{"lastUpload":"2020-12-23T15:20:36.766Z","extensionVersion":"v3.4.3"}
@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",