Skip to content

Instantly share code, notes, and snippets.

View jorgeavaldez's full-sized avatar
🦀
vibin

Jorge Valdez jorgeavaldez

🦀
vibin
View GitHub Profile
@jorgeavaldez
jorgeavaldez / machine.js
Created February 21, 2020 21:52
Generated by XState Viz: https://xstate.js.org/viz
const PAGE_ACTIONS = {
NEXT_PAGE: {
target: 'loadingPosts',
actions: assign({ page: ctx => ctx.page + 1 }),
},
PREV_PAGE: {
target: 'loadingPosts',
actions: assign({ page: ctx => ctx.page - 1 }),
},
FIRST_PAGE: {
Verifying my Blockstack ID is secured with the address 12rLDFFATLKR84SEccPq7DMi62FzHkELBc https://explorer.blockstack.org/address/12rLDFFATLKR84SEccPq7DMi62FzHkELBc
Verifying my Blockstack ID is secured with the address 1HNBF1jCeWTuCJVivZwR2qSvVYfkDgVnAy https://explorer.blockstack.org/address/1HNBF1jCeWTuCJVivZwR2qSvVYfkDgVnAy
@jorgeavaldez
jorgeavaldez / keybase.md
Created August 3, 2018 21:09
keybase.md

Keybase proof

I hereby claim:

  • I am jorgeavaldez on github.
  • I am delvaze (https://keybase.io/delvaze) on keybase.
  • I have a public key ASAx2RroO2R89otMQ3z6EtfQKszH3lxFDAbHZyIMgssMaAo

To claim this, I am signing this object:

@jorgeavaldez
jorgeavaldez / Dockerfile
Last active June 27, 2017 03:47
Node JS Docker Workflow Templates
FROM ubuntu
# Create the app source dir
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN apt-get -y update
# Time to install Node.JS version 7
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash
@jorgeavaldez
jorgeavaldez / Vagrantfile
Created November 7, 2016 20:45
MEAN Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Don't fucking change this line
Vagrant.configure("2") do |config|
# classic
config.vm.box = "ubuntu/trusty64"
# The server will by default listen at port 3000 if no port is specified.
# This forwards port 3000 on the VM to port 8080 on the host.
@jorgeavaldez
jorgeavaldez / continuous_servo.java
Created March 31, 2016 19:38
FYD - Keep the Servo in one Position while Processing Happens
public static void MoveServo(){
r.setVerbose(true);
r.attachServo(RXTXRobot.SERVO1, 10); //Connect the servos to the Arduino
r.moveServo(RXTXRobot.SERVO1, 90); // Move Servo 1 to location 30
for (int i = 0; i < 20; i++) {
System.out.println("MEMES");
r.moveServo(RXTXRobot.SERVO1, 90);
}
r.sleep(8000);
#!/usr/bin/env python
import random
f = open('valin.txt', 'w')
letters = 'abcdefghijklmnopqrstuvwxyz'
capLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ssize = random.randint(0, 90)
@jorgeavaldez
jorgeavaldez / tmux_cheatsheet.md
Created September 2, 2015 05:56 — forked from henrik/tmux_cheatsheet.markdown
tmux cheatsheet

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@jorgeavaldez
jorgeavaldez / preprocessor_fun.h
Last active August 29, 2015 14:27 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,