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
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
labels: | |
kubernetes.io/metadata.name: keycloak-test | |
name: keycloak-test | |
spec: | |
finalizers: | |
- kubernetes | |
status: |
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 | |
# curl -o- https://gist.githubusercontent.com/devpilot/6d0eb3eb5bc24bd19016ee62f7ba989d/raw/kube-setup.sh | sudo bash | |
# | |
# Make script executable | |
# chmod +x kube-setup.sh | |
# | |
# Run sctipt as root | |
# sudo ./kube-setup.sh |
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
from flask import Flask, send_file, make_response | |
import zipfile | |
import io | |
import pathlib | |
app = Flask(__name__) | |
@app.route("/download",methods=['GET']) | |
def request_zip(): | |
base_path = pathlib.Path('./data/') |
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 | |
buildFiles="build/static/js/*.chunk.js" | |
confFile="$(pwd)/client.conf" | |
while read -r line;do | |
key=$(echo "$line" | cut -d = -f 1) | |
value=$(echo "$line" | cut -d = -f 2) | |
sed -i "s|$key|$value|g" $buildFiles | |
done < $confFile |
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
# Start numbering at 1 | |
set -g base-index 1 | |
# Display message longer | |
set-option -g display-time 1500 | |
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix |
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 node | |
/** | |
* Format commit message as required by Pivotal hook | |
* export PIVTOKEN="<your token>" | |
* write you commit message with story id anywhere, preferred at the beginning or end of message | |
* commit message will formats into | |
* [Delivers #<story ID>] <Story title>\n <commit message> | |
*/ |
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
<?php | |
$jstime = "Mon Mar 20 2017 11:30:05 GMT+0530 (India Standard Time)"; | |
$t = substr( $jstime, 0, strpos($jstime, '(') ); | |
echo date( 'Y-m-d', strtotime($t) ); | |
?> |
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
I use the first | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 |
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
<?php | |
/** | |
* @package bc_exchange | |
* @version 1.2 | |
*/ | |
/* | |
Plugin Name: BC Exchange | |
Plugin URI: https://github.com/devpilot/ | |
Description: Get BTC Exchange rate from <a href="https://blockchain.info/">Blockchain</a> | |
Author: DevPilot |
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
<?php | |
/** | |
* Woocommerce - count specific product quantity bought by customer in all orders | |
* | |
* @param (int) $product_id | |
* @return int|bool | |
* @author devpilot | |
**/ | |
function product_qty_bought($product_id){ |
NewerOlder