Skip to content

Instantly share code, notes, and snippets.

@lydell
lydell / .gitignore
Last active December 28, 2022 04:33
Minify Elm code
node_modules
@michaelfeathers
michaelfeathers / c11r.rb
Created September 22, 2020 22:43
Proof of Concept for interactive creation of characterization tests
# Written by Michael Feathers July 10th, 2020
class Command
def run line, session
return unless matches? line
process line, session
end
end
class FixView < Command
@martinheld
martinheld / GraphQL introspection query via curl.md
Last active April 16, 2024 16:26
GraphQL introspection query via curl

GraphQL introspection query via curl

cat introspection_query.json

{ 
  "query": "query IntrospectionQuery {
      __schema {
        queryType { name }
        mutationType { name }
using System;
using System.Collections.Generic;
using System.Data.OleDb;
using System.Reflection;
using NUnit.Framework;
namespace Excel.CustomerTests
{
[TestFixture]
public class MathsCustomerTests
@psignoret
psignoret / ADAL_with_vanilla_JS.md
Last active May 11, 2021 14:15
Minimal sample app using ADAL.JS and vanilla JavaScript

Using ADAL.JS with vanilla JavaScript

A minimal sample app using ADAL.JS and plain old vanilla JavaScript to obtain an access token from Azure Active Directory and use that access token to make an API request. In this case, the API we're requesting a token for is the Microsoft Graph API, which is used to retrieve the signed-in user's basic profile.

You can see (and test) this live at: https://bl.ocks.org/psignoret/raw/50e88652ae5cb6cc157c09857e3ba87f/

@jcasimir
jcasimir / .gitignore
Last active March 1, 2024 08:01
Running all MiniTest Tests with SimpleCov
test/coverage/
@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@pedroreys
pedroreys / gist:2963187
Created June 21, 2012 00:45
Alias to generate pretty git log with graph of all branches
[alias]
    lg = log --graph --pretty=format:'%C(yellow)%d%Creset %C(cyan)%h%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=short --all

This alias is going to generate an output like this:

git log example output