Skip to content

Instantly share code, notes, and snippets.

View steve-todorov's full-sized avatar

Steve Todorov steve-todorov

  • Carlspring Ltd.
  • Bulgaria
  • 21:21 (UTC +03:00)
View GitHub Profile
@steve-todorov
steve-todorov / AuthenticationToken.java
Created February 12, 2020 16:21 — forked from phuonghuynh/AuthenticationToken.java
Spring Security - Multiple Authentication Providers
public class AuthenticationToken extends AbstractAuthenticationToken {
private String token;
public AuthenticationToken(String token) {
super(null);
this.token = token;
setAuthenticated(false);
}
@steve-todorov
steve-todorov / System Design.md
Created February 11, 2020 13:39 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@steve-todorov
steve-todorov / .block
Created December 10, 2019 17:13 — forked from mbostock/.block
Drag & Zoom
license: gpl-3.0
@steve-todorov
steve-todorov / README.md
Created December 10, 2019 01:21 — forked from jodyphelan/README.md
Force layout on canvas with zoom/pan and drag
@steve-todorov
steve-todorov / Jenkinsfile.groovy
Created October 30, 2019 20:54 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@steve-todorov
steve-todorov / gmail-github-filters.md
Created October 1, 2019 13:52 — forked from ldez/gmail-github-filters.md
Gmail and GitHub - Filters

Gmail and GitHub

Create new filters and create new labels.

Pull Request

from:([email protected]) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed 1 commit." "pushed 2 commits." "pushed 3 commits."}

label: gh-pull-request

@steve-todorov
steve-todorov / setup.md
Created September 17, 2019 22:12 — forked from shirakaba/setup.md
Configuring Nexus as a private registry for npm packages

Get the details to connect to your Nexus-managed npm repository

Note: Nexus group repositories (good example in this StackOverflow question) are out of this tutorial's scope. In any case, deployment to group repositories is currently still an open issue for Nexus 3 (and not intended ever to be implemented in Nexus 2). Thus, it is assumed that we'll push & pull to/from the same repository, and ignore the idea of groups hereon in.

  1. Ask your sysadmin for a username & password allowing you to log into your organistation's Nexus Repository Manager.

  2. Test the login credentials on the Nexus Repository manager at: http://localhost:8081/nexus/#view-repositories (localhost in our case is replaced by a static IP, and can only be connected to over VPN). If your organisation requires a VPN to connect to it, connect to that VPN before proceeding with this tutori

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta name=Title content="">
<meta name=Keywords content="">
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Word.Document>
@steve-todorov
steve-todorov / gpg.md
Created March 1, 2019 22:17 — forked from LauLaman/gpg.md
Use GPG to sign commits using git & PHPStorm

1 - install GPG tools : https://gpgtools.org/

2 - Create new key for your github email

3 - Add key to git on your local machine: git config --global user.signingkey YOURKEY

4 - configure git to sign all commits: git config --global commit.gpgsign true

5 - add to the bottom of ~/.gnupg/gpg.conf: