###TextMate 2 save on focus lost create file .tm_properties in home folder and add saveOnBlur = true to it
mate $HOME/.tm_properties
and insert
saveOnBlur = 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
// imports | |
@Configuration | |
@Profile("development") | |
public class DevelopmentSecurityConfig extends WebSecurityConfigurerAdapter { | |
@Autowired | |
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { | |
auth | |
.inMemoryAuthentication() |
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 tips.cloudnative.testauthentication; | |
import org.apache.commons.codec.binary.Base64; | |
import org.springframework.http.HttpHeaders; | |
public class TestAuthentication { | |
public static HttpHeaders basicAuthHeaders() { | |
String plainCreds = "user:password"; | |
byte[] plainCredsBytes = plainCreds.getBytes(); | |
byte[] base64CredsBytes = Base64.encodeBase64(plainCredsBytes); |
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 tips.cloudnative.todotest; | |
// imports | |
import static tips.cloudnative.testauthentication.TestAuthentication.basicAuthHeaders; | |
@RunWith(SpringJUnit4ClassRunner.class) | |
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) | |
public class TodoTest { | |
@Test |
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 tips.cloudnative.testauthentication; | |
import org.apache.commons.codec.binary.Base64; | |
import org.springframework.http.HttpHeaders; | |
public class TestAuthentication { | |
@Autowired | |
private CsrfTokenRepository csrfTokenRepository; |
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
@Configuration | |
@Profile("development") | |
public class DevelopmentSecurityConfig extends WebSecurityConfigurerAdapter { | |
@Bean | |
public CsrfTokenRepository csrfTokenRepository() { | |
return CookieCsrfTokenRepository.withHttpOnlyFalse(); | |
} | |
@Override |
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 tips.cloudnative.todotest; | |
// imports | |
import static tips.cloudnative.testauthentication.TestAuthentication.csrfHeaders; | |
@RunWith(SpringJUnit4ClassRunner.class) | |
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) | |
public class TodoTest { | |
@Test |
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
require 'octokit' | |
class GithubCLI | |
# make sure to set your GITHUB_TOKEN in the environment | |
# also, the ocktokit gem needs to be installed | |
def get_repos_from_org_with_no_teams_assigned(github_org) | |
client = Octokit::Client.new :access_token => ENV['GITHUB_TOKEN'] | |
client.auto_paginate = true |
OlderNewer