-
Create new Automator application with Run Shell script action (exact steps below).
- Open Automator.app (e.g. from Spotlight)
- Select File → New in menu
- Select "Application", click "Choose"
- With "Actions" toggle selected, type "Run Shell Script" in filter box, double click on filtered item
-
Put contents from
lock_spotify_version.shinto script's body (exact steps below). -
In opened right-hand item select
/bin/shas "Shell" type and copy contents of Gist's "lock_spotify_version.sh" below/in text area
This file contains hidden or 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
| package io.license.core.validation | |
| import javax.validation.Constraint | |
| import javax.validation.ConstraintValidator | |
| import javax.validation.ConstraintValidatorContext | |
| import javax.validation.Payload | |
| import kotlin.reflect.KClass | |
| @Target(AnnotationTarget.FIELD) |
This file contains hidden or 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
| Some Jenkinsfile examples |
This file contains hidden or 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
| package com.aj.samplemessaging.receiver; | |
| import org.springframework.amqp.AmqpRejectAndDontRequeueException; | |
| import org.springframework.amqp.rabbit.annotation.RabbitListener; | |
| import org.springframework.messaging.handler.annotation.Header; | |
| import org.springframework.messaging.handler.annotation.Payload; | |
| import org.springframework.stereotype.Component; | |
| import java.util.List; | |
| import java.util.Map; |
Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
This file contains hidden or 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 | |
| # check for where the latest version of IDEA is installed | |
| IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1` | |
| wd=`pwd` | |
| # were we given a directory? | |
| if [ -d "$1" ]; then | |
| # echo "checking for things in the working dir given" | |
| wd=`ls -1d "$1" | head -n1` |
This file contains hidden or 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
| var express = require('express'); | |
| var bodyParser = require('body-parser') | |
| var crypto = require('crypto'); | |
| // Calculate the X-Hub-Signature header value. | |
| function getSignature(buf) { | |
| var hmac = crypto.createHmac("sha1", process.env.FB_APP_SECRET); | |
| hmac.update(buf, "utf-8"); | |
| return "sha1=" + hmac.digest("hex"); | |
| } |
This file contains hidden or 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
| """Sequence-to-sequence model with an attention mechanism.""" | |
| # see https://www.tensorflow.org/versions/r0.10/tutorials/seq2seq/index.html | |
| # compare https://github.com/tflearn/tflearn/blob/master/examples/nlp/seq2seq_example.py | |
| from __future__ import print_function | |
| import numpy as np | |
| import tensorflow as tf | |
| vocab_size=256 # We are lazy, so we avoid fency mapping and just use one *class* per character/byte | |
| target_vocab_size=vocab_size | |
| learning_rate=0.1 |
This file contains hidden or 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
| package com.example; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.beans.factory.annotation.Qualifier; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.web.bind.annotation.RequestMapping; | |
| import org.springframework.web.bind.annotation.RestController; | |
| import java.util.List; |
This file contains hidden or 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
| alias c='docker-compose' | |
| alias cb='docker-compose build' | |
| alias cup='docker-compose up' | |
| alias cr='docker-compose run --service-ports --rm' | |
| alias crl='docker-compose run --service-ports --rm local' | |
| alias crd='docker-compose run --service-ports --rm develop' | |
| alias crt='docker-compose run --rm test' | |
| alias crp='docker-compose run --rm provision' | |
| alias crci='docker-compose run --rm ci' | |
| alias crwt='docker-compose run --rm watchtest' |
NewerOlder