Skip to content

Instantly share code, notes, and snippets.

View crissilvaeng's full-sized avatar

Cristina Silva crissilvaeng

View GitHub Profile
@crissilvaeng
crissilvaeng / Vagrantfile
Created March 16, 2019 02:28
Puppet Lab with Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<-SCRIPT
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb
dpkg -i puppetlabs-release-pc1-xenial.deb
apt-get update
SCRIPT
$server = <<-SCRIPT
// AI level 1: skill 3/20, depth 1, 50ms
// AI level 2: skill 6/20, depth 2, 100ms
// AI level 3: skill 9/20, depth 3, 150ms
// AI level 4: skill 11/20, depth 4, 200ms
// AI level 5: skill 14/20, depth 6, 250ms
// AI level 6: skill 17/20, depth 8, 300ms
// AI level 7: skill 20/20, depth 10, 350ms
// AI level 8: skill 20/20, depth 12, 400ms
{
"AttributeDefinitions": [
{
"AttributeName": "birth_day",
"AttributeType": "N"
},
{
"AttributeName": "birth_month",
"AttributeType": "N"
},
const load = protos => {
const dirname = path.join(__dirname, config.rpc.protos)
return fs.readdirSync(dirname)
.reduce((accum, curr) => {
if (curr.endsWith('.proto') == true) {
const proto = path.join(__dirname, config.rpc.protos, curr)
return [...accum, proto]
}
}, [])
}

Keybase proof

I hereby claim:

  • I am crissilvaeng on github.
  • I am crissilvaeng (https://keybase.io/crissilvaeng) on keybase.
  • I have a public key ASBTA2vRaZewQlqcwMcN8qPmkGl937shp9GfpOI7dQdpHQo

To claim this, I am signing this object:

angular.module('yourApp').run(['$templateCache', function($templateCache) {
$templateCache.put('directives/toast/toast.html',
"<div>Your template here</div>"
);
$templateCache.put('directives/progressbar/progressbar.html',
"<div>Your progressbar here</div>"
);
}]);
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import json
from marvel.marvel import Marvel
public_key = os.environ.get('MARVEL_API_PUBLIC_KEY')
private_key = os.environ.get('MARVEL_API_PRIVATE_KEY')
@crissilvaeng
crissilvaeng / Program.cs
Created June 2, 2017 16:58
Enum to custom string!
using System;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
func TestGetAnswer(t *testing.T) {
httpmock.Activate()
defer httpmock.DeactivateAndReset()
httpmock.RegisterResponder("GET", "https://localhost:8080/answer",
httpmock.NewStringResponder(200, `{"answer": 42}`))
}
func TestPostAnswer(t *testing.T) {
httpmock.Activate()
type Party struct {
ID int `db:"id"`
Description string `db:"description"`
StartAt time.Time `db:"start_at"`
EndAt time.Time `db:"end_at"`
Dangerous bool `db:"dangerous"`
}