# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT
# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT
# set http proxy with user and password (with special characters)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void KillExistingHosts(int port) | |
{ | |
if (Environment.OSVersion.Platform != PlatformID.Win32NT) | |
{ | |
return; | |
} | |
using (var existing = Win32.FindProcessOwner(port)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------------- | |
// Notice, this code is using BouncyCastle NuGet: | |
// https://www.nuget.org/packages/BouncyCastle/1.8.4/ | |
// Created by: Itsho | |
// Creation Date: 20 December 2018 | |
// ---------------------------------------------------- | |
using Org.BouncyCastle.Asn1.Pkcs; | |
using Org.BouncyCastle.Crypto; | |
using Org.BouncyCastle.Crypto.Generators; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#### Functions ### | |
display_usage() { | |
echo "This script must be run with Docker capable privileges and you should login to your registry before pushing!" | |
echo -e "\nUsage:\n$0 <saved_image> [--push]\n" | |
echo -e " <saved_image>\t\t\tThe image file to load and push" | |
echo -e " [--push]\t\t\tPush to registry" | |
echo -e "\nExample: $0 /mydir/ubuntu.tar --push " | |
} |
The official installation instructions for pgModeler recommends installing Xcode and the Enterprise DB distribution of Postgres to fulfill its build requirements. Luckily, Homebrew's got us covered!
-
Checkout the source
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
################################################################################ | |
# Boilerplate Shell Script with getopt parsing | |
# | |
# This script is released to the Public Domain by Chad Walstrom | |
# Chad Walstrom <chewie@wookimus.net>. | |
################################################################################ | |
NOACT=0 | |
NAME=$(basename $0|sed 's/\(\..*\)$//') | |
VERSION="0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Postgresql backup script | |
# http://www.bitweaver.org/wiki/pg_backup+PostgreSQL+backup+script | |
# | |
# Author | |
# | | |
# +-- speedboy (speedboy_420 at hotmail dot com) | |
# +-- spiderr (spiderr at bitweaver dot org) | |
# +-- flexiondotorg (code at flexion dot org) |
This gist is an example of how you can simply install and run and extended Postgres using docker-compose
. It assumes that you have docker
and docker-compose
installed and running on your workstation.
- Requires
docker
anddocker-compose
- Clone via http:
git clone https://gist.github.com/b0b7e06943bd389560184d948bdc2d5b.git
- Make
load-extensions.sh
executable - Build the image:
docker-compose build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data.Common; | |
using System.Data.Entity; | |
using System.Data.Entity.Infrastructure.Interception; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
namespace Demo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createCORSRequest (poMethod, pcURL) { | |
var oXHR = new XMLHttpRequest(); | |
if ('withCredentials' in oXHR) { | |
// Check if the XMLHttpRequest object has a "withCredentials" property. | |
// "withCredentials" only exists on XMLHTTPRequest2 objects. | |
oXHR.open(poMethod, pcURL, true); | |
} else if (typeof XDomainRequest != 'undefined') { | |
// Otherwise, check if XDomainRequest. | |
// XDomainRequest only exists in IE, and is IE's way of making CORS requests. |
NewerOlder