Skip to content

Instantly share code, notes, and snippets.

@reyronald
reyronald / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
/**
* CiscoSSH.php
*
* Designed to execute commands over SSH in
* Cisco devices (switches, routers, etc.).
* Only tested with Cisco (hence the name),
* but could also work with other brands or NEs.
*
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Mix Coberura LTE + WiMAX X Zonas Dic 16 2015.kml</name>
<Schema name="Santo_Domingo_Norte" id="Santo_Domingo_Norte00">
<SimpleField type="string" name="Name"></SimpleField>
<SimpleField type="string" name="SD Norte"></SimpleField>
</Schema>
<Schema name="SFM" id="SFM00">
<SimpleField type="string" name="SFM"></SimpleField>
</Schema>
@reyronald
reyronald / ServiceInterceptorAttribute.cs
Created September 1, 2016 16:19 — forked from randyburden/ServiceInterceptorAttribute.cs
Provides numerous service interceptors/hooks for a WCF service, endpoint, or method all wrapped up in a single attribute. You can derive from the ServiceInterceptorAttribute class to create your own custom interceptor attribute or use it in conjunction with a class that implements IServiceInterceptor. Update: This has graduated to it's own proje…
using System;
using System.Collections.ObjectModel;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
namespace Utilities.Wcf.Interceptors
{
/// <summary>
//pullrequestignore
'use strict';
import waitForRender from '../wait-for-render';
import waitForPullRequestContents from '../wait-for-pullrequest';
const COLLAPSE_DIFF_BUTTON_CLASS = '__refined_bitbucket_collapse_diff_button';
export function init() {
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
.skipped-container .__rb_ellipsis {
box-sizing: border-box;
background: #f5f5f5;
border: 1px solid #ccc;
border-radius: 3px;
box-shadow: 0 0 0 2px #fff;
color: #707070;
cursor: pointer;
display: block;
float: left;
@reyronald
reyronald / Loader.js
Created December 19, 2017 19:29
Reusable React component to wrap around other components that fetch AJAX data and shows a placeholder markup while it loads
import React, { Component } from 'react';
import {func} from 'prop-types';
class Loader extends Component {
static propTypes = {
fetchData: func.isRequired
}
state = { result: null }
@reyronald
reyronald / Await.js
Created December 19, 2017 20:27 — forked from evanrs/Await.js
React WaitOn component
const Promise = require('bluebird');
const React = require('react');
const superagent = require('superagent');
const assign = require('lodash/object/assign');
const isArray = require('lodash/lang/isArray');
const isFunction = require('lodash/lang/isFunction');
const isObject = require('lodash/lang/isArray');
const isString = require('lodash/lang/isString');
const log = require('debug')('component:await');
@reyronald
reyronald / DropCreateDatabaseAlwaysAndSeed.cs
Created January 4, 2018 18:10
Useful Entity Framework's DbContext Database Initializers
using Boundaries.Persistence.Contexts;
using Boundaries.Persistence.Migrations;
using System.Data.Entity;
using Validation;
namespace DatabaseInitializers
{
public sealed class DropCreateDatabaseAlwaysAndSeed : DropCreateDatabaseAlways<MyDbContext>
{
public override void InitializeDatabase(MyDbContext context)