Skip to content

Instantly share code, notes, and snippets.

pipeline {
agent any
triggers {
bitbucketPush()
}
tools {
jdk 'OpenJDK_1_8_0'
}
@sathyanglg
sathyanglg / build.sh
Created December 16, 2019 16:32 — forked from jonah-williams/build.sh
Command line iOS project builds and over-the-air distribution
#!/bin/bash
# https://gist.github.com/949831
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
# command line OTA distribution references and examples
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html
@sathyanglg
sathyanglg / mysql-docker.sh
Created December 16, 2019 16:31 — forked from rajibmitra/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: redis
spec:
template:
metadata:
labels:
app: redis
tier: backend
@sathyanglg
sathyanglg / keycloak.sh
Created December 16, 2019 16:29 — forked from pandeybk/keycloak.sh
Keycloak Admin API Rest Example
#!/bin/bash
export KEYCLOAK_URL="http://localhost:8080"
export USERNAME="admin"
export PASSWORD="password"
export CLIENT_ID="admin-cli"
export TKN=$(curl -X POST "$KEYCLOAK_URL/auth/realms/master/protocol/openid-connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=${USERNAME}" \
# nginx Configuration File
# http://wiki.nginx.org/Configuration
# Run as a less privileged user for security reasons.
user forge;
# How many worker threads to run;
# "auto" sets it to the number of CPU cores available in the system, and
# offers the best performance. Don't set it higher than the number of CPU
# cores if changing this parameter.
@sathyanglg
sathyanglg / build.sh
Created December 16, 2019 16:09 — forked from adamvduke/build.sh
Command line iOS project builds and over-the-air distribution
#!/bin/bash
# https://gist.github.com/949831
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
# command line OTA distribution references and examples
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html
@sathyanglg
sathyanglg / https_only
Created December 16, 2019 12:23 — forked from jult/https_only
[NGINX] Redirect all hostnames and requests from http to https serverwide
# To have port 80 requests go to their 443 equivalents for an entire webserver, put this file in /etc/nginx/conf.d/
# Note that to specify the catch-all name or default server you
# need to use the *listen* directive, not the server_name directive!
# See also https://nginx.org/en/docs/http/request_processing.html
#
# - $host catches subdomain names.
# - 307 and 308 include both POST and GET request URIs.
# - 307 is Temporary, change to the Permanent 308 after thorough testing: # return 308 https://$host$request_uri;
server {
via: http://groups.google.com/group/phillycocoa/browse_thread/thread/2d05f3eac5a7d260?hl=en
revert file:
git checkout HEAD path/to/file
OR
git checkout filename
pluck one file from another branch
git checkout Branch path/to/file
@sathyanglg
sathyanglg / gist:963f1657fd39eecfa73951f28f5ac3eb
Created December 16, 2019 12:17 — forked from xanf/gist:3638383
build.phonegap.com
#!/bin/bash
TOKEN="mytokenhere"
APP=0000100
$SENCHA_SDK_TOOLS_2_0_0_BETA3/sencha app build -e testing || exit 1
pushd ./build/testing >/dev/null
zip ../app.zip -r * >/dev/null
popd >/dev/null
echo -n "Uploading to build.phonegap.com..."
curl -s -o /dev/null -X PUT -F file=@./build/app.zip https://build.phonegap.com/api/v1/apps/$APP\?auth_token\=$TOKEN || exit 1