ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
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
| ### java -jar | |
| java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar | |
| ### Maven | |
| Debug Spring Boot app with Maven: | |
| mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001" |
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.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter; | |
| /** | |
| * https://stackoverflow.com/questions/48446708/securing-spring-boot-api-with-api-key-and-secret | |
| */ | |
| public class APIKeyAuthFilter extends AbstractPreAuthenticatedProcessingFilter { | |
| private String principalRequestHeader; |
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
| CREATE EXTENSION IF NOT EXISTS "unaccent" | |
| CREATE OR REPLACE FUNCTION slugify("value" TEXT) | |
| RETURNS TEXT AS $$ | |
| -- removes accents (diacritic signs) from a given string -- | |
| WITH "unaccented" AS ( | |
| SELECT unaccent("value") AS "value" | |
| ), | |
| -- lowercases the string | |
| "lowercase" AS ( |
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 binascii | |
| import hashlib | |
| import base64 | |
| from pyDes import * | |
| data = '000000000000000000000000000000' | |
| #key = '48C3B4286FF421A4A328E68AD9E542A4' | |
| key = 'E6F1081FEA4C402CC192B65DE367EC3E' | |
| key = binascii.unhexlify(key) |
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 sublime, sublime_plugin | |
| class ExampleCommand(sublime_plugin.TextCommand): | |
| def run(self, edit): | |
| tag = 'ya' | |
| index = 0 | |
| line_count = self.view.rowcol(self.view.size())[0] + 1 |
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 List<Map<String, Object>> query(String sql) { | |
| Connection conn = null; | |
| PreparedStatement ps = null; | |
| ResultSet rs = null; | |
| List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>(); | |
| try { |