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
@RunWith(PowerMockRunner.class) @PowerMockIgnore("javax.net.ssl.*") @PrepareForTest(WeatherUtil.class) | |
public class WeatherTest { | |
@Test public void testGoodPayload() { | |
PowerMockito.mockStatic(WeatherUtil.class); | |
weatherObject = jsonToObject(stringToJson(goodPayload)); | |
when(WeatherUtil.getWeatherBody(LLNL_WEATHER)).thenReturn(weatherObject); | |
when(WeatherUtil.getWeather(LLNL)).thenCallRealMethod(); | |
when(WeatherUtil.getSiteId(Mockito.anyObject())).thenCallRealMethod(); | |
Weather testWeather = WeatherUtil.getWeather(LLNL); | |
assertNotNull(testWeather); |
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 mutagen.mp3 import MP3 | |
import glob | |
seconds = 0.0 | |
for f in glob.glob("*.mp3"): | |
audio = MP3(f) | |
seconds = seconds + audio.info.length | |
print (seconds//3600) |
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
#%RAML 1.0 | |
title: Skeleton API | |
version: v1 | |
baseUri: https://api.example.com/ | |
traits: | |
standard-error-responses: | |
responses: |
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
""" | |
install mp3splt http://mp3splt.sourceforge.net/mp3splt_page/home.php | |
add to environment variable PATH=>C:\Program Files (x86)\mp3splt or | |
save and run this file from that location | |
""" | |
import os | |
import glob | |
from subprocess import call |
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
MAVEN_HOME="/usr/local/Cellar/maven/3.5.0/libexec" | |
export MAVEN_HOME | |
JAVA_HOME="$(/usr/libexec/java_home -v 1.8)" | |
export JAVA_HOME | |
PYTHONPATH="/usr/bin/python2.7" | |
export PYTHONPATH |
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
#clone | |
$ git clone https://git.some.repo/ | |
$ cd myproject | |
#list all branches | |
$ git branch -a | |
* master | |
remotes/origin/HEAD | |
remotes/origin/master | |
remotes/origin/orders |
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
// Place your settings in this file to overwrite the default settings | |
{ | |
"eslint.enable": false, | |
"telemetry.enableTelemetry": true, | |
"window.openFilesInNewWindow": "off", | |
"window.zoomLevel": 0, | |
"files.associations": {"*.dwl":"yaml","*.xml":"xml"}, | |
"python.linting.pylintEnabled": false, | |
"python.linting.enabled": false, | |
"http.proxyStrictSSL": false, |
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
git checkout BRANCH_THAT_YOU_WANT_TO_BE_MASTER | |
git merge -s ours master | |
git checkout master | |
git merge BRANCH_THAT_YOU_WANT_TO_BE_MASTER | |
https://stackoverflow.com/questions/2862590/how-to-replace-master-branch-in-git-entirely-from-another-branch |
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 mypackage; | |
import com.auth0.jwt.*; | |
import com.auth0.jwt.algorithms.Algorithm; | |
import com.auth0.jwt.exceptions.JWTVerificationException; | |
import com.auth0.jwt.interfaces.DecodedJWT; | |
import java.util.HashMap; | |
public class JWTBuilder { |
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
using System; | |
using System.Collections.Specialized; | |
using System.Linq; | |
using System.Text; | |
using System.IO; | |
using System.Diagnostics; | |
using Microsoft.SqlServer.Management.Smo; | |
using Microsoft.SqlServer.Management.Common; | |
using System.Reactive.Linq; | |
using System.Threading.Tasks; |