Skip to content

Instantly share code, notes, and snippets.

View ricklancee's full-sized avatar
💭
Edit status

Rick Lancee ricklancee

💭
Edit status
View GitHub Profile
@ricklancee
ricklancee / TransposeAllVertical.vba
Created December 18, 2014 12:34
TransposeAllVertical
Sub TransposeAllVertical()
Dim RowNumber As Long, l As Long
RowNumber = InputBox("Please enter to last row number.", "Row number:", "1000")
If RowNumber = 0 Then
MessageBox.Show ("You must enter a Row number continue.")
Exit Sub
End If

BDD - Behavior driven development

  • Story
  • Description
    • In order, As a, I want to
  • Senario
    • Give, Then, When

Story: Returns go to stock

<?php
namespace RickLancee;
use Closure;
use Countable;
use ArrayIterator;
use IteratorAggregate;
class Collection implements Countable, IteratorAggregate
{
@ricklancee
ricklancee / Dto.php
Last active August 29, 2015 14:23
Easy -read only- access for a DTOs private properties.
<?php
final class Dto
{
use Gettable;
private $title;
private $description;
public function __construct($title, $description) {
@ricklancee
ricklancee / host-manager
Last active August 29, 2015 14:24 — forked from nddrylliog/host-manager
Easily edit your /etc/host file
#!/bin/bash
_hosts() {
hostfile="/etc/hosts"
addusage="Usage: `basename $0` --add address host"
remusage="Usage: `basename $0` --remove host"
case "$1" in
--add)
if [ $# -eq 3 ]; then
/** Light */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'),
url('../fonts/Open_Sans/OpenSans-Light.ttf') format('ttf');
unicode-range: U+000-5FF; /* Latin glyphs */
}

Automate release workflow

If your project follows a semantic versioning, it may be a good idea to automatize the steps needed to do a release. Below you have a simple recipe that bumps the project version, commits the changes to git and creates a new tag.

var gulp = require('gulp');
var runSequence = require('run-sequence');
var conventionalChangelog = require('gulp-conventional-changelog');
@ricklancee
ricklancee / custom.zsh-theme
Last active May 21, 2016 12:21
Custom oh my zsh theme based on suvash
function prompt_char {
echo '$'
}
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
function collapse_pwd {
echo $(pwd | sed -e "s,^$HOME,~,")
@ricklancee
ricklancee / script.js
Last active December 16, 2016 17:38
Script and styling to create better UX on 9anime.to; removes unnecesary items & displays watched series.
function addSeriesToStorage(series, episode) {
if (series && episode) {
let items = localStorage.getItem('w-'+series);
if (!items) {
localStorage.setItem('w-'+series, JSON.stringify([episode]));
} else {
items = JSON.parse(items);
if (items.indexOf(episode) === -1) {
items.push(episode);

Keybase proof

I hereby claim:

  • I am ricklancee on github.
  • I am ricklancee (https://keybase.io/ricklancee) on keybase.
  • I have a public key whose fingerprint is D6D2 CE64 E9C0 5C9D D40F 58F5 0A35 C0A1 0129 64C2

To claim this, I am signing this object: