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
{ | |
"title": "Swap Left Option/Command only in WoW", | |
"rules": [ | |
{ | |
"description": "Left Option to Command in WoW", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_option" |
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
allprojects { | |
apply plugin: 'java' | |
apply plugin: 'jacoco' | |
repositories { | |
jcenter() | |
} | |
jacoco { | |
toolVersion = '0.7.1.201405082137' |
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
#https://github.com/eternnoir/pyTelegramBotAPI | |
#pip install pyTelegramBotAPI | |
import telebot | |
from telebot import types | |
import time | |
TOKEN = '208043687:AAFK9Acv9mo8psa-z8oB4Hf9RiDprjgUn7s' | |
bot = telebot.TeleBot(TOKEN) |
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
echo -n | openssl s_client -connect gitlab.com:443 | \ | |
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | \ | |
sudo tee '/usr/local/share/ca-certificates/gitlab_com.crt' | |
sudo update-ca-certificates |
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
import org.joda.time.Instant; | |
import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener; | |
public class MongoSynchronizedListener extends AbstractMongoEventListener<Object> { | |
/** | |
* Called in MongoTemplate insert, insertList and save operations before the | |
* object is converted to a DBObject using a MongoConveter. | |
*/ |
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/bash | |
# ./backup.sh pro databaseName | |
# Validations | |
if [ -z "$1" ] ; then | |
echo `date`" specify a environment ['tst', 'pro']" | |
exit 1 | |
elif [ "$1" != "tst" ] && [ "$1" != "pro" ]; then | |
echo `date`" specify a valid environment ['tst', 'pro']" | |
exit 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
#!/bin/bash | |
# Params: | |
# 1- filename in s3. Ex: mongobackup-tst-28-05-2015-1432802174.7z | |
# 2- source env. Ex: pro | |
# 3- target env to restore in. Ex: tst | |
# 4- target database name. Ex: databaseRestore | |
# ex: ./restore.sh mongobackup-tst-28-05-2015-1432802174.7z pro tst databaseRestore | |
# s3 file exists and ends with .tar.gz | |
if [ -z "$1" ] || [[ ! $1 =~ .*.7z ]]; then |
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
import com.google.common.cache.Cache; | |
import com.google.common.cache.CacheStats; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.actuate.endpoint.PublicMetrics; | |
import org.springframework.boot.actuate.metrics.Metric; | |
import org.springframework.cache.CacheManager; | |
import org.springframework.stereotype.Component; | |
import org.springframework.util.Assert; | |
import java.util.ArrayList; |
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.shootr.api.config; | |
import java.util.List; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.http.converter.HttpMessageConverter; | |
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; | |
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; | |
import com.fasterxml.jackson.annotation.JsonInclude.Include; |
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.shootr.api.web.rest.exception; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.validation.FieldError; | |
import org.springframework.web.bind.annotation.ControllerAdvice; | |
import org.springframework.web.bind.annotation.ExceptionHandler; |
NewerOlder