Skip to content

Instantly share code, notes, and snippets.

View lordlycastle's full-sized avatar
🤙
Let it Fly!

lordlycastle

🤙
Let it Fly!
View GitHub Profile
var fs = require('fs'),
Converter = require('swagger2-postman2-converter');
function handleConversion(originalFileName, newFileName) {
// read the local swagger file
var swaggerObject = JSON.parse(
fs.readFileSync(originalFileName, 'utf8')
);
#!/usr/bin/env bash
#
# Written by Denilson Figueiredo de Sá <[email protected]>
# MIT license
#
# Requirements:
# * bash (tested on 4.20, should work on older versions too)
# * awk (works with GNU awk, nawk, busybox awk, mawk)
# * ping (from iputils)
#
# The settings in each Host section are applied to any Git SSH remote URL with a matching hostname.
# Generally:
# * SSH uses the first matching line for each parameter name, e.g. if there's multiple values for a
# parameter across multiple matching Host sections
# * "IdentitiesOnly yes" prevents keys cached in ssh-agent from being tried before the IdentityFile
# values we explicitly set.
# * On Windows, ~/.ssh/your_private_key maps to %USERPROFILE%\.ssh\your_private_key, e.g.
# C:\Users\<username>\.ssh\your_private_key.
# To use the same key across all hosted Azure DevOps organizations, where the SSH URL host is
@lordlycastle
lordlycastle / dtrx.py
Created July 20, 2020 09:53
dtrx -- Intelligently extract various archive types
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# dtrx -- Intelligently extract various archive types.
# Copyright © 2006-2011 Brett Smith <[email protected]>
# Copyright © 2008 Peter Kelemen <[email protected]>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your

Http Status Codes

This is a list of Hypertext Transfer Protocol response status codes, status codes are issued by the server in response to the request made by the client.

All the HTTP response status codes are seperated into five classes or categories. The first digit of the code tells us the class of the response, while the last two digits do not have any classifying or categorizing role.

There are five classes of Http Status Codes

| Category | Meaning |

@lordlycastle
lordlycastle / SceneViewBookmarker.cs
Created July 18, 2020 19:01
Save scene view viewport for later use.
using UnityEditor;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace SceneViewBookmarker
{
struct Bookmark
{
public Vector3 pivot;
public Quaternion rotation;
#This work is licensed under Creative Commons Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0)
#That means, you must give attribution wherever you use it, and you cannot use it for profit.
#Please see https://creativecommons.org/licenses/by-nc/3.0/ for more details.
#!/bin/python3
from random import randint
print('Welcome to Roast Bot! Begin your conversation with the computer by typing literally anyting and pressing "enter".')
#!/usr/bin/env bash
if [ $# -ne 2 ]; then
>&2 echo "Usage: $0 <author> <commit>"
exit 1
fi
AUTHOR=$1
AUTHOR_NAME=$(echo $AUTHOR | perl -wlne '/^(.*?)\s*<.*>$/ and print $1')
AUTHOR_EMAIL=$(echo $AUTHOR | perl -wlne '/^.*\s*<(.*)>$/ and print $1')
@lordlycastle
lordlycastle / latex documentation.txt
Last active June 29, 2020 12:02 — forked from kadrach/gist:6228314
Enabling texdoc: Texlive/BasicTeX
Found here: http://macosx-tex.576846.n2.nabble.com/BasicTeX-and-documentation-td7579224.html
Problem: BasicTex does not come with texdoc installed, and does not build docs by default
1. Install texdoc
> tlmgr install texdoc
2. Enable automatic build of documentation, which is disabled (default) for BasicTeX tlmgr.
> tlmgr option docfiles 1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/sbin</string>
</dict>
<key>KeepAlive</key>