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
| android.buildTypes.all{ theBuildType -> | |
| task ("${theBuildType.name}MyCustomTask"){ | |
| dependsOn "compile${theBuildType.name.capitalize()}" | |
| doLast{ | |
| println theBuildType.debuggable | |
| } | |
| } | |
| } |
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
| android.applicationVariants.all { variant -> | |
| variant.generateBuildConfig.dependsOn "preprocess${variant.name}" | |
| } |
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
| android.buildTypes.all{ theBuildType -> | |
| def buildType = theBuildType.name | |
| def taskName = "run${theBuildType.name.capitalize()}" | |
| task ("${taskName}") { | |
| dependsOn "install${theBuildType.name.capitalize()}" | |
| doLast { | |
| def xml = new File(buildDir.toString() + "/manifests/${buildType}/AndroidManifest.xml") | |
| def manifest = new XmlParser(false,true).parseText(xml.getText()) | |
| def ns = new groovy.xml.Namespace("http://schemas.android.com/apk/res/android", "ns") |
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
| public function onBootstrap(MvcEvent $e) | |
| { | |
| $eventManager = $e->getApplication()->getEventManager(); | |
| $moduleRouteListener = new ModuleRouteListener(); | |
| $moduleRouteListener->attach($eventManager); | |
| $sharedEvents = $eventManager->getSharedManager(); | |
| // PostDispatch (priorityが1以上ならpre, 未満ならpost) | |
| $sharedEvents->attach(__NAMESPACE__, MvcEvent::EVENT_DISPATCH, [$this, 'injectDispatch'], -100); | |
| } |
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
| public class TwitterUploadClient { | |
| private final String UPLOAD_ENDPOINT = "https://upload.twitter.com"; | |
| MediaService service; | |
| final RestAdapter adapter; | |
| TwitterUploadClient(TwitterAuthConfig authConfig, Session session, SSLSocketFactory sslSocketFactory, ExecutorService executorService) { | |
| if(session == null) { | |
| throw new IllegalArgumentException("Session must not be null."); |
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
| { | |
| "parser": "babel-eslint", | |
| "rules": { | |
| "no-extra-strict": 0, | |
| "dot-notation": 0, | |
| "quotes": 0 | |
| }, | |
| "globals": { | |
| "global": true, | |
| }, |
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
| --- | |
| - hosts: all | |
| sudo: yes | |
| tasks: | |
| - name: Add repository 'epel-repo' | |
| yum: name=http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm state=present | |
| - name: Add repository 'rpmforge-repo' | |
| yum: name=http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm state=present |
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
| + (UIImage *)snapshotView:(UIView *)view { | |
| UIGraphicsBeginImageContextWithOptions(view.frame.size, NO, [[UIScreen mainScreen] scale]); //0 | |
| [view drawViewHierarchyInRect:view.frame afterScreenUpdates:YES]; | |
| UIImage *snapshot = UIGraphicsGetImageFromCurrentImageContext(); | |
| UIGraphicsEndImageContext(); | |
| return snapshot; | |
| } | |
| + (UIImage *)snapshot { | |
| CGSize imageSize = CGSizeZero; |
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
| (function(global, Promise) { | |
| 'use strict'; | |
| var DEFAULT_TIMEOUT = 10000; // millisec | |
| // Class ------------------------------------------------ | |
| function SimpleAgent(params) { | |
| params = !params || {}; | |
| this.timeout = params.timeout || DEFAULT_TIMEOUT; | |
| this.headers = params.headers || {}; |
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
| FROM mysql:5.6.23 | |
| COPY ./my.cnf /etc/mysql/my.cnf | |
| COPY ./docker-entrypoint-initdb.d/* /docker-entrypoint-initdb.d/ |
OlderNewer