Skip to content

Instantly share code, notes, and snippets.

View marcomansilla's full-sized avatar

Marco marcomansilla

View GitHub Profile
@marcomansilla
marcomansilla / p
Last active October 21, 2020 04:42
#!/bin/bash
# -Marco Mansilla-
# This scripts assumes you have set your projects folder to $PROJECTS_DIR
# for my current user I have my projects in $HOME/work, this will name a session after
# the project and set it as root folder.
# this is for setting up a workspace in tmux
if [[ $# -eq 1 ]]; then
if [[ -d $PROJECTS_DIR$1 ]]; then
@marcomansilla
marcomansilla / gist:7873685c330ea04788f1278471abc5b2
Created March 17, 2020 00:42 — forked from fd0/gist:6951577
i3 multi monitor config snippet
# assign workspaces to screens
workspace 1 output DVI-I-1
workspace 2 output DVI-I-1
workspace 3 output DVI-I-1
workspace 4 output DVI-I-1
workspace 5 output DVI-I-1
workspace 6 output HDMI-0
workspace 7 output HDMI-0
workspace 8 output HDMI-0
workspace 9 output HDMI-0
@marcomansilla
marcomansilla / test.py
Created September 18, 2019 15:29
Execute at flask initialization
"""
one way to excute something after app.run:
build another app!
From
http://librelist.com/browser/flask/2012/6/7/execute-at-flask-initialization/#a0b5c59832f372f69be6f6e2af4ae4f9
"""
from flask import Flask
import webbrowser
<template>
<nav id="pagination">
<ul class="page-numbers" v-if="$store.state.totalPageCount">
<li v-for="num in this.pageNumbers" v-if="num != null" v-bind:style="{ width: (100 / pageNumberCount) + '%' }">
<nuxt-link v-if="num != $route.query.page && num != currentPage" :to="{ path: '/', query: { page: num } }">{{ num }}</nuxt-link>
<span v-else>{{ num }}</span>
</li>
</ul>
<ul class="page-guides" v-if="this.$store.state.totalPageCount != 1">
<li>
{
"countries": [
{
"country": "Afghanistan",
"states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"]
},
{
"country": "Albania",
"states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"]
},
<!doctype html>
<html>
<head>
<title>This goes to gist</title>
<meta charset="utf-8" />
</head>
<body>
<div>
<span>This should fold, but does not...</span>
</div>