Skip to content

Instantly share code, notes, and snippets.

View jrgcubano's full-sized avatar

Jorge Rodríguez Galán jrgcubano

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jrgcubano
jrgcubano / git_newrepo
Created June 19, 2018 15:12 — forked from c0ldlimit/git_newrepo
Git: Push a new or existing repo to Github
# Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/c0ldlimit/vimcolors.git
git push -u origin master
# Push an existing repository from the command line
@jrgcubano
jrgcubano / _readme.md
Created April 10, 2018 11:44 — forked from robdmoore/_readme.md
NodeJS Script to automate deployment of Cordova/PhoneGap application using PhoneGapBuild

pgb-wrapper.js is a generic wrapper module around the phonegap-build-api NodeJS package to add promise support and some helpful functions to make it easier to create a build script.

pgb.example.js is one example of such a build script, but you might decide to do it differently.

You can execute pgb.example.js by:

node pgb.example.js --appId {PGB_APP_ID} --apiKey {PGB_API_KEY} --zipFile {path/to/deployment_file.zip} --iosOverTheAirKey {NAME_OF_IOS_OVER_THE_AIR_KEY_IN_PGB} --iosOverTheAirKeyPassword {PASSWORD_OF_IOS_OVER_THE_AIR_KEY_IN_PGB} --iosKey {NAME_OF_IOS_PRODUCTION_KEY_IN_PGB} --iosKeyPassword {PASSWORD_OF_IOS_PRODUCTION_KEY_IN_PGB} --androidKey {NAME_OF_ANDROID_PRODUCTION_KEY_IN_PGB} --androidKeyPassword {PASSWORD_OF_ANDROID_PRODUCTION_KEY_IN_PGB}

The following node packages need to be installed for it all to work:

  • phonegap-build-api
@jrgcubano
jrgcubano / store.js
Created March 6, 2018 11:33 — forked from chris-burgin/store.js
Object Literal Redux Store Reducer
// ****************
// Reducer Imports
// ****************
import {
// users
DELETEUSER,
UPDATEUSER,
ADDUSER,
ADDUSERS
} from "./reducers/index.js"
@jrgcubano
jrgcubano / docker-clean.ps1
Created February 7, 2018 14:18 — forked from bradwilson/docker-clean.ps1
Docker Cleanup
(& docker images --all --quiet --filter 'dangling=true') | Foreach-Object {
& docker rmi $_ | out-null
}
(& docker ps --quiet --filter 'status=exited' ) | Foreach-Object {
& docker rm $_ | out-null
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Scripting;
using Microsoft.CodeAnalysis.Scripting.CSharp;
namespace RoslynScriptingTest
{
@jrgcubano
jrgcubano / CmderZSH.md
Created January 5, 2018 10:21 — forked from dfontana/CmderZSH.md
My setup guide for installing Cgywin, Mintty, Cmder, and ZSH.

What's this?

Instructions to obtain ZSH on a windows environment, without the input funny business presented by some other attempted solutions.

The final result is ZSH running on a mintty terminal, emulated by cygwin, and being handled by the popular cmder.

Why is this here?

For the benefit of myself and others. I've already followed these instructions twice. It took me hours to figure all this out, maybe someone else can save a few.

What exactly is covered?

  • Installing and setting up cmder
@jrgcubano
jrgcubano / DispatchBenchmark.cs
Created December 13, 2017 08:47 — forked from heemskerkerik/DispatchBenchmark.cs
Benchmark of different double dispatch methods in C#
// depends on BenchmarkDotNet 0.10.10
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
using BenchmarkDotNet.Running;
@jrgcubano
jrgcubano / Roslyn.CodeGeneration.Program.cs
Created October 31, 2017 09:00 — forked from cmendible/Roslyn.CodeGeneration.Program.cs
Create a class with dotnet core and roslyn with using statements outside the namespace
using System;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Roslyn.CodeGeneration
{
public class Program
{
public static void Main(string[] args)
@jrgcubano
jrgcubano / create_github_tag.sh
Created September 23, 2017 00:19 — forked from cliffparnitzky/create_github_tag.sh
Simple way to create a tag via git shell and push it to repo
# creat a tag (more infos at: http://git-scm.com/book/de/ch2-12.html)
git tag -a 1.0.0 -m 'Version 1.0.0'
git push origin 1.0.0
git tag -a 1.0.0.alpha1 -m 'Version 1.0.0 alpha1'
git push origin 1.0.0.alpha1
# delete a tag
git tag -d 1.0.0
git push origin :refs/tags/1.0.0