Skip to content

Instantly share code, notes, and snippets.

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

Stivenson stivenson

🏠
Working from home
View GitHub Profile

Crystal on WASM

Running

  • crystal wasm.cr
  • php -S localhost:3000
  • open your browser
  • open dev tool js console
  • crystal.add(1, 2)
@zetogk
zetogk / setup.md
Last active September 23, 2019 16:25
Setup Gitlab SSH Key

SSH Key setup

  • Add an SSH key in gitlab.com in order to work with ssh repositories

  • Add the following configuration lines in the file ~ / .ssh/config

Host *
IgnoreUnknown UseKeychain
UseKeychain yes
@mfrachet
mfrachet / detox-fill-input.js
Last active June 14, 2018 23:40
detox-fill-input
describe('Handle changes on input text', () => {
it('should have...', async () => {
const itemAdder = await element(by.id('inputAdder'));
const touchableAdder = await element(by.id('touchableAdder'));
// Focus the input field
await itemAdder.tap();
await itemAdder.typeText('Item');
// expectations
});
@fernandez14
fernandez14 / account.js
Last active May 12, 2017 16:07
Mithril 1.x component example.
import m from 'mithril';
import stream from 'mithril/stream';
import {Button} from '../../ui';
import {Account} from '../../models';
export const FormAccountPublicPage = {
oninit(vnode) {
this.loading = true;
this.saving = false;
this.errors = false;
@nrollr
nrollr / MongoDB_macOS_Sierra.md
Last active April 1, 2024 16:23
Install MongoDB on Sierra using Homebrew

Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@subfuzion
subfuzion / empty-example.md
Last active February 26, 2024 20:39
Protocol Buffer example of importing and using empty

How to import and indicate empty request or reply messages:

import "google/protobuf/empty.proto";

service SomeService {
    rpc SomeOperation (google.protobuf.Empty) returns (google.protobuf.Empty) {}
}
@stivenson
stivenson / fillfortesting.js
Last active August 12, 2016 17:13 — forked from jonkemp/prepopulate.html
Fill your forms with random data. For testing forms. Requires jQuery.
$( function() {
$('form').find('input:text').val( function(i, val) {
return randomText();
});
$('form').find('input[type="number"]').val( function(i, val) {
return randomInt();
});

Install Kuberenetes in CentOS(Standalone)

yum install -y etcd
# vim /etc/yum.repos.d/virt7-docker-common-release.repo

[virt7-docker-common-release]
@stivenson
stivenson / Image.php
Last active June 22, 2020 14:03
Clase php para operaciones sobre una imagen en base64 o en Archivo
<?php
namespace Helpers; // Optional
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
@tobyzerner
tobyzerner / app.js
Created April 8, 2015 02:38
Mithril ES6 Components
import Component from './component';
class Widget extends Component {
init(ctrl) {
var props = this.props;
ctrl.counter = props.initialValue;
ctrl.increment = function() {
ctrl.counter++;