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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Python: loadbalancer test", | |
| "type": "python", | |
| "request": "launch", | |
| "module": "pytest", | |
| "args": [ | |
| "--no-cov" |
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
| //DISABLED is jenkins parameter(boolean) | |
| if(DISABLED.toBoolean()) | |
| { | |
| disabled() | |
| } | |
| else | |
| { | |
| disabled(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
| btrfsck --force /dev/mdxxx |
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 | |
| # via http://askubuntu.com/questions/510056/how-to-install-google-chrome | |
| wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
| sudo apt-get update | |
| sudo apt-get install google-chrome-stable | |
| # Update |
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 -b (branch-name) | |
| change source-code | |
| git add * && git commit -m "changelog" | |
| git push origin (branch-name) | |
| git checkout master | |
| git (branch-name) | |
| git push |
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
| $ErrorActionPreference = "Stop" | |
| $notificationTitle = "Notification: " + [DateTime]::Now.ToShortTimeString() | |
| [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null | |
| $template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText01) | |
| #Convert to .NET type for XML manipuration | |
| $toastXml = [xml] $template.GetXml() | |
| $toastXml.GetElementsByTagName("text").AppendChild($toastXml.CreateTextNode($notificationTitle)) > $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
| $AllProtocols = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12' | |
| [System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols | |
| $Auth = "username:token_or_password" | |
| $Bytes = [System.Text.Encoding]::UTF8.GetBytes($Auth) | |
| $Base64bytes = [System.Convert]::ToBase64String($Bytes) | |
| $Headers = @{ "Authorization" = "Basic $Base64bytes"} | |
| #Jenkins Job URL with TOKEN (disable CSRF) | |
| $jenkinsurl_withtoken = "JENKINS_URL/job/JOB_NAME/build?token=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
| curl -F file=@/path/to/image -F channels=general -F token=[TOKEN_NOT_WEBHOOK_URL] https://slack.com/api/files.upload |
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 samples.javaee; | |
| import static org.hamcrest.CoreMatchers.*; | |
| import static org.junit.Assert.*; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import javax.annotation.Resource; | |
| import javax.ejb.EJB; |
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.springframework.context.ApplicationContextInitializer; | |
| import org.springframework.web.context.ConfigurableWebApplicationContext; | |
| public class ContextProfileInitializer | |
| implements ApplicationContextInitializer<ConfigurableWebApplicationContext> { | |
| public void initialize(ConfigurableWebApplicationContext ctx) { | |
| String profiles = "prod"; | |
| if (ctx.getServletContext().getServerInfo().startsWith("jetty")) { | |
| profiles = "dev"; |
NewerOlder