Skip to content

Instantly share code, notes, and snippets.

View brunowego's full-sized avatar
🎯
Focusing

Bruno Wego brunowego

🎯
Focusing
View GitHub Profile
@christopher-hopper
christopher-hopper / vm-resize-hard-disk.md
Last active April 5, 2022 10:30
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@tadast
tadast / ssl_puma.sh
Last active January 29, 2024 04:41 — forked from trcarden/gist:3295935
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@ngpestelos
ngpestelos / remove-docker-containers.md
Last active May 31, 2024 15:10
How to remove unused Docker containers and images

May 8, 2018

I wrote this four years ago, so instead use this command:

$ docker rmi $(docker images -q -f dangling=true)

Vagrant

Plugins

  • vagrant plugin install vagrant-bindfs
  • vagrant plugin install vagrant-vbguest

Config BINDFS

Before installing bindfs, we need to install FUSE with development package using yum:

  • yum install fuse fuse-devel -y

br helper

usage

{{#br [number of breaks]}}
// content
{{/br}}
@egermano
egermano / parsley-cpf.js
Created September 4, 2014 22:22
Parsley CPF validator
window.ParsleyConfig = {
validators: {
cpf: {
fn : function ( val, req) {
val = $.trim(val);
val = val.replace('.','');
val = val.replace('.','');
cpf = val.replace('-','');
while(cpf.length < 11) cpf = "0"+ cpf;
@mlynch
mlynch / autofocus.js
Last active August 24, 2022 15:03
AngularJS Autofocus directive
/**
* the HTML5 autofocus property can be finicky when it comes to dynamically loaded
* templates and such with AngularJS. Use this simple directive to
* tame this beast once and for all.
*
* Usage:
* <input type="text" autofocus>
*
* License: MIT
*/
@idleberg
idleberg / DropboxIgnore.md
Last active June 4, 2023 12:02
Ignore node_modules/bower_components folders in your Dropbox

This script scans your Dropbox (or any given folder) for folders stored in the ignore array and excludes them from syncing. Makes use of the official Dropbox CLI

I'm a beginner at bash, so all improvements are welcome!

#!/bin/bash

set -e

# SETTINGS
@mlanett
mlanett / rails http status codes
Last active June 7, 2024 02:33
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@tecfu
tecfu / gist:f84a65ffa850a0bc2e88
Last active August 29, 2015 14:06
Solving the file name with multiple dots problem in Grunt:

Solving the file name with multiple dots problem in Grunt:

Use the extDot property instead of the ext property.

In Grunt, this is how your can match filenames with multiple dots and write to filenames that contain the original dot sequence, except for file extension.

/path/to/module.somename.scss -> /path/to/module.somename.css