Skip to content

Instantly share code, notes, and snippets.

View darccio's full-sized avatar
🏠
Working from home

Dario Castañé darccio

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am darccio on github.
  • I am dario (https://keybase.io/dario) on keybase.
  • I have a public key ASCJSKu3vOdil45zRxc-f9uDSCtuf1dPSSg7LCRQjXMNjwo

To claim this, I am signing this object:

@darccio
darccio / GitHub Wiki Subtree Storage.markdown
Created June 8, 2020 20:56 — forked from yukoff/GitHub Wiki Subtree Storage.markdown
Store and edit GitHub wikis within the main project repository.

Project documentation

The project documentation (stored in the docs directory) is a git subtree of the project wiki. This allows for the documentation to be referenced and edited from within the main project.

Initial local setup

When cloning the main project repository for the first time, the wiki repository must be added as a remote.

git remote add wiki https://github.com//.wiki.git

@darccio
darccio / setup_go.md
Created November 22, 2019 10:00 — forked from rubencaro/setup_go.md
Golang installation guide

Golang installation guide

Since Golang version 1.11 this process is finally (almost) as easy as it should (!!). You can see full docs here. For older guides see here.

These are my notes, not a generic solution. They are not meant to work anywhere outside my machines. Update version numbers to whatever are the current ones while you do this.

Installing everything needed the first time

Install asdf and its golang plugin, then install golang

@darccio
darccio / consumer.py
Created August 15, 2019 09:28
NSQ class-based consumer
import nsq
class NSQWorker:
def __init__(self, *args, **kwargs):
self.banner = 'Hello from worker'
def process_message(self, message):
print(self.banner)
@darccio
darccio / blockstack-proof.txt
Created August 9, 2019 06:47
Blockstack verification
Verifying my Blockstack ID is secured with the address 1tTTtWN8ZxHHWmEgpMnQ5mzds5akh9cs9 https://explorer.blockstack.org/address/1tTTtWN8ZxHHWmEgpMnQ5mzds5akh9cs9
@darccio
darccio / truffle-config.js
Created April 3, 2019 10:06
System Error when running Ganache 2.0.0 on win32 #1184
/**
* Use this file to configure your truffle project. It's seeded with some
* common settings for different networks and features like migrations,
* compilation and testing. Uncomment the ones you need or modify
* them to suit your project as necessary.
*
* More information about configuration can be found at:
*
* truffleframework.com/docs/advanced/configuration
*
@darccio
darccio / dhondt.go
Created January 14, 2019 23:45
D'Hondt method
package electoral
import (
"sort"
)
// CandidatureResult is all the votes tallied for a candidature.
type CandidatureResult struct {
Name string
Votes int
@darccio
darccio / README.md
Created November 29, 2018 16:54 — forked from keyo/README.md
jQuery Field Dependencies

jQuery Field Dependencies

Author: Ben Brady Licensed: MIT

Overview

Allows selected elements to be changed (shown/hidden or callback) based on a set of field validation rules.

This is useful for large forms where you may want to hide/disable various fieldsets which are relevant only if a particular input element is selected/checked.

@darccio
darccio / pidshield.sh
Last active August 23, 2017 22:15
PID Shield: protect your commands against parallel execution
#!/bin/bash
##
## PID Shield: protect your commands against parallel execution
##
## Author: Dario Castañé <[email protected]>
##
## License: Public domain; do as you wish
##
@darccio
darccio / mnt-data.mount
Created August 15, 2017 14:53
Post-provision initial setup for Scaleway's Debian Stretch image
[Unit]
Description=Mount Data Volume at boot
[Mount]
What=UUID="$(blkid)"
Where=/mnt/data
Type=ext4
Options=defaults
[Install]