Skip to content

Instantly share code, notes, and snippets.

View bmpvieira's full-sized avatar

Bruno Vieira bmpvieira

  • Portugal
View GitHub Profile
@domenic
domenic / 0-github-actions.md
Last active May 26, 2024 07:43
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.

Disclaimer: This is an unofficial post by a random person from the community. I am not an official representative of io.js. Want to ask a question? open an issue on the node-forward discussions repo

io.js - what you need to know

io-logo-substack

  • io is a fork of node v0.12 (the next stable version of node.js, currently unreleased)
  • io.js will be totally compatible with node.js
  • the people who created io.js are node core contributors who have different ideas on how to run the project
  • it is not a zero-sum game. many core contributors will help maintain both node.js and io.js
# A quick function to save a PBM (http://en.wikipedia.org/wiki/Netpbm_format)
# visualize *a lot* of missing data pretty quickly (outside of R).
writeMissingPBM <- function(x, file) {
dims <- dim(x)
x[] <- as.integer(is.na(x))
con <- file(file, open="wt")
writeLines(sprintf("P1\n%d %d", ncol(x), nrow(x)), con)
write.table(x, file=con, sep=" ", col.names=FALSE, row.names=FALSE, quote=FALSE)
close(con)
var once = require('once')
var concurrent = 10
var pending = 0
through(function(data, enc, cb) {
cb = once(cb)
pending++
if (pending < concurrent) cb()
rr().write(data, function(err) {
if (err) return cb(err)
@hubgit
hubgit / README.md
Last active August 29, 2015 14:05
Stream filtered tweets into dat
  1. sudo aptitude install git php5-cli nodejs
  2. npm install -g npm
  3. npm install -g maxogden/dat
  4. dat init
  5. dat listen
  6. Create a Twitter application and generate OAuth keys for your user - add the app and user credentials to stream.php.
  7. composer init && composer require fennb/phirehose:dev-master && composer install
  8. php stream.php | dat import -json
  9. Install and start dat-editor then open dat-editor to browse the table.
@mgreensmith
mgreensmith / Slack_solarized_themes
Last active March 17, 2025 14:33
Solarized themes for Slack
Solarized
#FDF6E3,#EEE8D5,#93A1A1,#FDF6E3,#EEE8D5,#657B83,#2AA198,#DC322F
Solarized Dark
#073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F
@max-mapper
max-mapper / package.json
Last active August 29, 2015 14:04
fcc-ecfs to dat importer
{
"name": "fcc-ecfs",
"version": "1.0.0",
"gasket": {
"main": [
"gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-1.xml",
null,
"gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-2.xml",
null,
"gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-3a.xml",
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 14, 2025 09:43
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@ViViDboarder
ViViDboarder / install-user-mosh.sh
Last active September 9, 2023 02:05
Mosh is great, but sometimes the remote server you're accessing doesn't have it installed or doesn't give you sudo access. This script will install mosh as a user.
#! /bin/bash
# Make a directory to hold local libs and bins
mkdir -p ~/usr/local
# Get protobuf
wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
# Extract protobuf
tar -xvzf protobuf-2.5.0.tar.gz
cd protobuf-2.5.0