Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Javier Carrillo Milla stringparser

🏠
Working from home
Block or report user

Report or block stringparser

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@stringparser
stringparser / README.md
Last active Mar 3, 2018
webpack + typescript + react config #blog
View README.md
@stringparser
stringparser / thy-minimal-docs.md
Last active Jan 19, 2018
Documentation thoughts for non-library projects
View thy-minimal-docs.md

Documentation

Ideas about documenting enough for non-library projects.

Motivation

The aim of this document is to give rules to follow in order to make a project understandable from a producer and consumer point of view. The idea is to have a simple setup where code self-documents itself whenever possible. When this is not possible we will give options on how to go about it.

Where to start?

View git-extras-plus.sh
alias grune='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d'
alias drune='docker rm $(docker ps -aq)'
@stringparser
stringparser / npm-boot.sh
Last active Oct 19, 2019
boostrap nested npm modules
View npm-boot.sh
# boostrap nested npm modules installation
npm-boot() {
local INIT_DIR=$PWD
# go through all packages and install their dependencies
for package in `ls ./**/package.json | grep -v node_modules`
do
cd $INIT_DIR
cd $(dirname $package)
echo "Installing modules for $PWD"
@stringparser
stringparser / url.sh
Created Sep 3, 2016
find urls in all css files
View url.sh
grep -oh 'url[^)]*' ./**/*.css | grep -o "[/.][^\\'\\\"?#]*"
@stringparser
stringparser / background.js
Created Aug 9, 2016 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
View background.js
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@stringparser
stringparser / _.isEqual.coffee
Created Jun 26, 2016
smaller lodash.isEqual
View _.isEqual.coffee
__toString = Object.prototype.toString
isEqual = (a, b) ->
if arguments.length < 2
return false # cannot compare
typeA = typeOf(a)
typeB = typeOf(b)
# falsy values can be compared by reference except for NaN
@stringparser
stringparser / oneToCloneThemAll.sh
Created Jul 31, 2015
Clone all private repos of an organization
View oneToCloneThemAll.sh
curl -u <token>:x-oauth-basic -s https://api.github.com/orgs/<orgName>/repos | node -e '
var repos="";
process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on("data", function(data){
repos += data;
});
process.stdin.on("end", function(){
JSON.parse(repos).forEach(function(repo){
require("child_process").spawn("git", ["clone", repo.html_url], {stdio: "inherit"});
View isomorphicish.js
var _ = require('underscore');
var Backbone = require('backbone');
var cheerio = require('cheerio');
var request = require('request');
Backbone.ajax = function(options) {
options.json = true;
return request(options, function(error, result) {
if (error) {
@stringparser
stringparser / texsvg.hs
Last active Aug 29, 2015 — forked from lierdakil/texsvg.hs
Pandoc filter to convert math to inline svg using latex and dvisvgm
View texsvg.hs
import Text.Pandoc.JSON
import System.Directory
import System.FilePath ((</>))
import qualified Data.Hash.MD5 as MD5
import System.IO.Temp
import System.Process
import Control.Monad (unless)
main :: IO ()
main = toJSONFilter mathToSvg
You can’t perform that action at this time.