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
| Integer VERSION_CODE = 16 | |
| String VERSION_NAME = getVersionName("0.4-SNAPSHOT") | |
| def getVersionName(String preferredVersionName) { | |
| if (preferredVersionName.contains("-SNAPSHOT")) { | |
| return getGitStatus(preferredVersionName) | |
| } else { | |
| return preferredVersionName | |
| } |
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
| Intent intent = new Intent(getActivity(), HomeActivity.class); | |
| intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |
| finishActivity(); | |
| getActivity().startActivity(intent); |
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
| config defaultToCurrentScreen true | |
| config nudgePercentOf screenSize | |
| config resizePercentOf screenSize | |
| # Resize bindings | |
| bind end:alt resize +10% +0 | |
| bind home:alt resize -10% +0 | |
| bind pageUp:alt resize +0 -10% | |
| bind pageDown:alt resize +0 +10% | |
| bind end:ctrl;alt resize -10% +0 bottom-right |
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 | |
| # Run this in the terminal and keep waiting for the response. | |
| for i in `seq 1 1000000`; | |
| do | |
| echo $i | |
| curl 'http://giphy.com/ajax/contest/vote' -H 'Cookie: __qca=P0-1475105941-1414474206710; _cb_ls=1; __asc=949617dd149553b8dfc7f2b22f2; __auc=949617dd149553b8dfc7f2b22f2; __utma=157163181.13407325.1414474207.1414474207.1414474207.1; __utmb=157163181.2.10.1414474207; __utmc=157163181; __utmz=157163181.1414474207.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _chartbeat2=851IKu1DUaBZ3vbj.1414474208673.1414474469947.1' -H 'X-NewRelic-ID: VwQBUlZWGwEAVlJSAwI=' -H 'Origin: http://giphy.com' -H 'Accept-Encoding: gzip,deflate' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: */*' -H 'Referer: http://giphy.com/stickershop/sticker/a2FpeWVlLnRheUBnbWFpbC5jb20' -H 'X-CSRFToken: undefined' -H 'X-Requested- |
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
| private static String stripTokens(String log) { | |
| if (HIDE_TOKENS) { | |
| /* Common REGEX patterns for replacing tokens */ | |
| log = log.replaceAll("token=\\S*", "token=ACCESS_TOKEN_REMOVED "); | |
| log = log.replaceAll("client_secret=\\S*", "client_secret=CLIENT_SECRET_REMOVED "); | |
| log = log.replaceAll("access_token=\\S*", "access_token=ACCESS_TOKEN_REMOVED "); | |
| log = log.replaceAll("code=\\S*", "code=SOME_CODE_REMOVED "); | |
| } | |
| return log; | |
| } |
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 java.util.concurrent.Executors; | |
| import java.util.concurrent.Future; | |
| import java.util.concurrent.ScheduledExecutorService; | |
| import java.util.concurrent.TimeUnit; | |
| public class CommonEventLoop { | |
| private static CommonEventLoop __instance; | |
| private ScheduledExecutorService m_executor = Executors.newSingleThreadScheduledExecutor(); |
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
| /home/msk/Desktop/tb/comm-central/obj-x86_64-unknown-linux-gnu/mozilla/_virtualenv/bin/python -u /home/msk/Desktop/tb/comm-central/mozilla/config/pythonpath.py \ | |
| -I./build \ | |
| -I/home/msk/Desktop/tb/comm-central/mozilla/build \ | |
| -I./_tests/mozbase/mozinfo \ | |
| /home/msk/Desktop/tb/comm-central/mozilla/testing/xpcshell/runxpcshelltests.py \ | |
| --manifest=./_tests/xpcshell/xpcshell.ini \ | |
| --build-info-json=./mozinfo.json \ | |
| --interactive \ | |
| --test-plugin-path='dist/plugins' \ | |
| --tests-root-dir=/home/msk/Desktop/tb/comm-central/obj-x86_64-unknown-linux-gnu/mozilla/_tests/xpcshell \ |
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 Dexter { | |
| private static String optimizedDirectory = "optimized"; | |
| private static String workDirectory = "working"; | |
| public static void loadFromAssets(Context context, String fileName) throws Exception { | |
| File optimized = new File(optimizedDirectory); | |
| optimized = context.getDir(optimized.toString(), Context.MODE_PRIVATE); | |
| optimized = new File(optimized, fileName); |