Skip to content

Instantly share code, notes, and snippets.

View joseluis's full-sized avatar
💭
dreamin' n workin'

José Luis Cruz joseluis

💭
dreamin' n workin'
View GitHub Profile
@pulyaevskiy
pulyaevskiy / .travis.yml
Created April 10, 2016 17:30
Generate code coverage in TravisCI build and send it to Codecov
# Workaround which:
# * Starts observatory in background
# * Runs the test suite
# * Collects coverage and sends it to Codecov
#
# Someday the `test` package will support observatory and below steps
# could be simplified.
#
# Prerequisites:
# * Have Travis CI build for your repo
@kived
kived / animtest.py
Created March 24, 2016 17:35
Kivy: precision animation
import kivy
kivy.require('1.8.1')
from kivy.app import App
from kivy.lang import Builder
from kivy.clock import Clock
from kivy.utils import interpolate
from time import time
root = Builder.load_string('''

How you can help reduce node_modules bloat

This recent reddit thread reveals discontent among the web development community about the sheer volume of stuff in a typical node_modules dir. 140MB in this case!

Is it a design flaw in npm?

Opinions in the thread varied from "I'm surprised npm even works" to "everything is fine". I'm not going to offer an opinion, just these two observations:

  1. node_modules dirs typically do contain lots of stuff that doesn't need to be there.
  2. The latest version mitigates overall size by flattening the dependency tree, but some of the bloat is beyond npm's control.
@plugnburn
plugnburn / README.md
Last active May 26, 2024 11:20
Statix - the simplest static website generator in bash

Statix - the simplest static website generator in Bash

Statix is a stand-alone Bash script aimed at generating full-featured, routable static websites from reusable HTML snippets. It features the most basic templating engine ever possible but allows to organize your content in a SEO-friendly way. All Statix-based websites contain these parts:

  • Templates: a directory where all HTML templates are stored
  • Route configuration: a file that maps each publicly accessible template to a SEO-friendly URL
  • Assets: a directory with optional files copied to the output website directory with no processing.

This script is also lightweight. Aside from some standard file management commands such as cp, mkdir and rm, the only serious dependency for Statix is GNU Grep compiled with PCRE support (i.e. the version that supports -P flag, included in most Linux distributions).

@davidhund
davidhund / pragmatic-touch-icons.md
Last active September 4, 2020 15:42
Pragmatic Touch Icons

NOTE I'm trying to find the most optimal fav/touch icon setup for my use-cases. Nothing new here. Read Mathias Bynens' articles on re-shortcut-icon and touch icons, a FAQ or a Cheat Sheet for all the details.

I'd like to hear how you approach this: @valuedstandards or comment on this gist.

The issue

You have to include a boatload of link elements pointing to many different images to provide (mobile) devices with a 'favicon' or 'touch icon':

![Touch Icon Links](https://o.twimg.com/2/proxy.jpg?t=HBj6AWh0dHBzOi8vcGhvdG9zLTYuZHJvcGJveC5jb20vdC8yL0FBRGFGY1VRN1dfSExnT3cwR1VhUmtaUWRFcWhxSDVGRjNMdXFfbHRJWG1GNFEvMTIvMjI3OTE2L3BuZy8xMDI0eDc2OC8yL18vMC80L1NjcmVlbnNob3QlMjAyMDE1LTA0LTE0JTIwMTYuNTYuMjYucG5nL0NNejBEU0FCSUFJZ0F5Z0JLQUkvNGR1eDZnMzZmYnlzYWI3

@jonatanrdsantos
jonatanrdsantos / curl-problem.md
Last active August 21, 2020 05:23
curl port 443: Network is unreachable problem

How to solve the curl port 443: Network is unreachable problem:

joridos@localhost:~/Documents/github$ opam init
default    Downloading https://opam.ocaml.org/urls.txt
'opam init' failed.
# opam-version    1.1.1
# os              linux
Cannot download https://opam.ocaml.org/urls.txt, please check your connection settings.
joridos@localhost:~/Documents/github$ curl https://opam.ocaml.org/urls.txt
@darcyparker
darcyparker / installNeovim.sh
Last active January 13, 2024 04:28
Build and install neovim for Debian
#!/usr/bin/env bash
#Build and install neovim for Debian
#See: https://neovim.io/
#See: https://github.com/neovim/neovim/wiki/Building-Neovim#quick-start
#See: https://gist.github.com/darcyparker/153124662b05c679c417
#Save current dir
pushd . > /dev/null || exit

Git Cheat Sheet

Commands

Getting Started

git init

or

#Installing Taiga on CentOS 6 (x64)

##Dependencies ...

yum update -y
yum groupinstall "Development Tools" -y
yum install libxslt-devel libxml2-devel libXt-devel curl git tmux -y

##Installing PostgreSQL

anonymous
anonymous / gist:b04bfd0103e0558659fb
Created January 10, 2015 00:24
Countries
<wpcf-fields-select-option-australia>
<title>Australia</title>
<value>1</value>
</wpcf-fields-select-option-australia>
<wpcf-fields-select-option-canada>
<title>Canada</title>
<value>2</value>
</wpcf-fields-select-option-canada>
<wpcf-fields-select-option-france>
<title>France</title>