This file contains 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 re | |
import sys | |
special_cases = [r'(Ё|Ю|Я)\.', r'(\s)Е\.', r'(\s)е', r'(\s)Е', r'(\s)?("|«|“)е', r'(\s)?("|«|“)Е', r'^Е', r'^е'] | |
special_case_mappings= ['Ý.', r'\1Ý.', r'\1ýe', r'\1Ýe', r'\1\2ýe', r'\1\2Ýe', 'Ýe', 'ýe'] | |
turkmen_cyrillic_lc = ("а", "б", "в", "г", "д", "ъе", "е", "ё", "ж", "җ", "з", "и", "й", "к", "л", "м", "н", "ң", "о", "ө", "п", "р", "с", "т", "у", "ү", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы", "ь", "э", "ә", "ю", "я") | |
turkmen_latin_lc = ("a", "b", "w", "g", "d", "ýe", "e", "ýo", "ž", "j", "z", "i", "ý", "k", "l", "m", "n", "ň", "o", "ö", "p", "r", "s", "t", "u", "ü", "f", "h", "s", "ç", "ş", "ş", "", "y", "", "e", "ä", "ýu", "ýa") | |
turkmen_cyrillic_uc = ("А", "Б", "В", "Г", "Д", "ъе", "Е", "Ё", "Ж", "Җ", "З", "И", "Й", "К", "Л", "М", "Н", "Ң", "О", "Ө", "П", "Р", "С", "Т", "У", "Ү", "Ф", "Х", "Ц", "Ч", "Ш", "Щ", "Ъ", "Ы", "Ь", "Э", "Ә", "Ю", "Я") |
This file contains 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
from base64 import b64encode | |
from nacl import encoding, public | |
import requests | |
MY_PAC = '' | |
ORG = 'MyOrg' | |
REPO = 'repo' | |
secrets = { | |
'TOOL_USER': 'admin', |
This file contains 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 | |
# usage `source assume_role.sh prod token` | |
unset AWS_ACCESS_KEY_ID | |
unset AWS_SECRET_ACCESS_KEY | |
unset AWS_SESSION_TOKEN | |
if (( $# != 2 )); then | |
echo "Two arguments are required: profile and token" | |
exit 1 |
This file contains 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
/* | |
* Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* | |
* - Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* |
This file contains 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 -e | |
# create a temp dir in which to work | |
OLDDIR="$PWD" | |
mkdir /tmp/rds-ca && cd /tmp/rds-ca | |
# download the bundle | |
wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem | |
# split the bundle into individual certs (prefixed with xx) | |
csplit -sz rds-combined-ca-bundle.pem '/-BEGIN CERTIFICATE-/' '{*}' |
This file contains 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
@Path("/blog") | |
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, "application/vnd.blog.v2+xml", "application/vnd.blog.v2+json"}) | |
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, "application/vnd.blog.v2+xml", "application/vnd.blog.v2+json"}) | |
public interface BlogRestfulService { | |
... | |
} |
This file contains 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
@Path("/blog") | |
@Consumes({"application/vnd.blog.v2+xml", "application/vnd.blog.v2+json"}) | |
@Produces({"application/vnd.blog.v2+xml", "application/vnd.blog.v2+json"}) | |
public interface BlogRestfulService { | |
... | |
} |
This file contains 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
@Consumes({"application/vnd.blog.v1+xml", "application/vnd.blog.v1+json"}) | |
@Produces({"application/vnd.blog.v1+xml", "application/vnd.blog.v1+json"}) | |
public interface BlogRestfulService { | |
@GET | |
@Path("/posts") | |
List<Post> getPosts(); | |
@GET | |
@Path("/post/{id}") |
This file contains 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 java.lang.annotation.Retention; | |
import java.lang.annotation.Target; | |
import javax.enterprise.util.Nonbinding; | |
import javax.inject.Qualifier; | |
@Qualifier | |
@Retention(RUNTIME) | |
@Target({METHOD, FIELD, PARAMETER, TYPE}) | |
public @interface Configuration { | |
@Nonbinding |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> | |
<context:component-scan base-package="tutorial"/> | |
<bean id="org.dozer.Mapper" class="org.dozer.DozerBeanMapper"/> |
NewerOlder