Skip to content

Instantly share code, notes, and snippets.

View hayari10's full-sized avatar

Ayari haythem hayari10

View GitHub Profile
@pragmaticivan
pragmaticivan / Jenkinsfile
Created March 22, 2018 19:20 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage concurrency constraints, ...
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
/*
Please make sure to add the following environment variables:
HEROKU_PREVIEW=<your heroku preview app>
HEROKU_PREPRODUCTION=<your heroku pre-production app>
HEROKU_PRODUCTION=<your heroku production app>
@jcavat
jcavat / Dockerfile
Last active April 15, 2025 17:40
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
@TRBaldim
TRBaldim / updateMap.scala
Created January 17, 2017 21:50
Update Immutable Map in Scala
def updateMap[A, B](map: Map[A, List[B]], key: A, value: B) =
map + ((key, map.getOrElse(key, List()) ::: List(value)))
var topicsMap = offsetsRanges.map { o => (o.topic, List[String]())}.toMap
offsetsRanges.foreach { o =>
topicsMap = updateMap[String, String](topicsMap, o.topic, (o.partition + ":" + o.untilOffset))}
@swillits
swillits / Keycodes.swift
Last active October 22, 2024 15:30
Swift Keyboard Keycodes
struct Keycode {
// Layout-independent Keys
// eg.These key codes are always the same key on all layouts.
static let returnKey : UInt16 = 0x24
static let enter : UInt16 = 0x4C
static let tab : UInt16 = 0x30
static let space : UInt16 = 0x31
static let delete : UInt16 = 0x33
static let escape : UInt16 = 0x35
@wesleybliss
wesleybliss / docker-compose-node-mongo.yml
Created September 9, 2016 21:37
Docker Compose with example App & Mongo
version: '2'
services:
myapp:
build: .
container_name: "myapp"
image: debian/latest
environment:
- NODE_ENV=development
- FOO=bar
volumes: