Skip to content

Instantly share code, notes, and snippets.

@suraphanL
suraphanL / DatabricksPushgatewayExporter.py
Created March 16, 2023 14:26 — forked from Lowess/DatabricksPushgatewayExporter.py
Databricks Prometheus Integration
import os
import threading
import urllib.request
import logging
from time import sleep
__author__ = "Florian Dambrine <android.florian@gmail.com>"
class DatabricksPushgatewayExporter:
"""
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@suraphanL
suraphanL / prepare-commit-msg.sh
Created August 9, 2019 03:31 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
//: Playground - noun: a place where people can play
import UIKit
struct Mobile {
let number: String
let status: String
}
releaseConfig="Debug"
if [ "$releaseConfig" != "${CONFIGURATION}" ]; then
echo "Running Crashlytics"
./Fabric.framework/run <your_api_key_here>
fi
let myLocale = Locale(identifier: "th_TH")
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .full
dateFormatter.timeStyle = .full
dateFormatter.locale = myLocale
let date = Date()
let stringFromDate = dateFormatter.string(from: date)
@suraphanL
suraphanL / ioslocaleidentifiers.csv
Created October 5, 2016 15:29 — forked from JaseHadd/ioslocaleidentifiers.csv
iOS Locale Identifiers
localeIdentifier Description
eu Basque
hr_BA Croatian (Bosnia & Herzegovina)
en_CM English (Cameroon)
rw_RW Kinyarwanda (Rwanda)
en_SZ English (Swaziland)
tk_Latn Turkmen (Latin)
he_IL Hebrew (Israel)
ar Arabic
uz_Arab Uzbek (Arabic)
#!/usr/bin/env groovy
def getBuildNumber() {
stage 'Get Build Number'
def job = build job: 'ios-buildnumber'
env.BUILD_ID = job.getNumber()
}
node('your node name') {
echo "Starting Pipeline"
FROM debian:jessie
# Create the jenkins user
RUN useradd -d "/var/jenkins_home" -u 1000 -m -s /bin/bash jenkins
# Create the folders and volume mount points
RUN mkdir -p /var/log/jenkins
RUN chown -R jenkins:jenkins /var/log/jenkins
VOLUME ["/var/log/jenkins", "/var/jenkins_home"]
FROM jenkinsci/jenkins:2.0
USER root
RUN mkdir /var/log/jenkins
RUN mkdir /var/cache/jenkins
RUN chown -R jenkins:jenkins /var/log/jenkins
RUN chown -R jenkins:jenkins /var/cache/jenkins
USER jenkins
ENV JAVA_OPTS="-Xmx8192m"