Skip to content

Instantly share code, notes, and snippets.

View christru's full-sized avatar

Chris Trujillo christru

  • TruDigital Mortgage Solutions
  • Tucson, AZ
View GitHub Profile
@arunredhu
arunredhu / http-client.js
Last active February 10, 2021 15:58
Http client for Vue.js application
import axios from 'axios';
/** Default config for axios instance */
let config = {
baseURL: 'http://localhost:3000/'
};
/** Creating the instance for axios */
const httpClient = axios.create(config);
@joseluisq
joseluisq / currencies.json
Created April 3, 2018 08:39
JSON list of all currency symbols available from the Open Exchange Rates API - https://docs.openexchangerates.org/docs/currencies-json
{
"AED": "United Arab Emirates Dirham",
"AFN": "Afghan Afghani",
"ALL": "Albanian Lek",
"AMD": "Armenian Dram",
"ANG": "Netherlands Antillean Guilder",
"AOA": "Angolan Kwanza",
"ARS": "Argentine Peso",
"AUD": "Australian Dollar",
"AWG": "Aruban Florin",
@DavidDeSloovere
DavidDeSloovere / upload.cs
Created November 17, 2016 14:13
SFTP upload with SSH.NET
const string host = "domainna.me";
const string username = "chucknorris";
const string password = "norrischuck";
const string workingdirectory = "/highway/hell";
const string uploadfile = @"c:\yourfilegoeshere.txt";
Console.WriteLine("Creating client and connecting");
using (var client = new SftpClient(host, port, username, password))
{
client.Connect();
@juliandunn
juliandunn / post-mortem-template.md
Created April 29, 2015 00:53
Post mortem template

INCIDENT DATE - INCIDENT TYPE

Meeting

Waiving meetings

In some cases the IC might determine that a PM meeting for the incident isn't needed. If the IC decides to waive the meeting please replace the Meeting section with a note indicating the meeting has been waived (example: Meeting waived: Paul Mooring)

@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing
@davemackintosh
davemackintosh / .htaccess
Last active May 2, 2024 15:52
Working .htaccess for Single Page Apps
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.html [QSA,L]
</ifModule>
@aksakalli
aksakalli / SimpleHTTPServer.cs
Last active April 22, 2024 13:20
SimpleHTTPServer in C#
// MIT License - Copyright (c) 2016 Can Güney Aksakalli
// https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.IO;
@berzniz
berzniz / jshipster_and_and.js
Last active May 22, 2022 23:15
Some small javascript hacks for hipsters
// Boring
if (isThisAwesome) {
alert('yes'); // it's not
}
// Awesome
isThisAwesome && alert('yes');
// Also cool for guarding your code
var aCoolFunction = undefined;
@msoap
msoap / Raspberry Pi httpd benchmark.md
Last active September 26, 2018 16:09
Raspberry Pi httpd benchmark with wrk

Raspberry Pi httpd benchmark

Total RPS

All:

               Go/fasthttp (10 thr): 930.0 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

Nginx (10 thr): 826.1 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

@ats
ats / Runkeeper_API_startup.md
Created May 8, 2013 04:00
Runkeeper API startup guide: I ran into some hitches with the Runkeeper API while building a plugin to hook it to Slogger, so I wrote a quick guide to accompany the plugin itself.

Runkeeper API startup

Begin with the Runkeeper Registration/Authorization page for general instructions to get started. This page points to the Application Portal you can use to establish your application. You'll obtain client_id and client_secret by registering a personal application in that portal.

Then obtain code by submitting a request to https://runkeeper.com/apps/authorize with the following parameters directly from the Runkeeper instructions:

  • client_id: The unique identifier that your application received upon registration
  • code: code
  • redirect_uri: The page on your site where the Health Graph API should redirect the user after accepting or denying the access request