Skip to content

Instantly share code, notes, and snippets.

@yigityus
yigityus / bash
Last active April 4, 2021 15:12 — forked from jonashackt/bash
Remote debugging Spring Boot
### 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"
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;
@yigityus
yigityus / slugify.sql
Created October 8, 2019 12:43 — forked from ianks/slugify.sql
Generating Slugs in Postgres
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 (
import binascii
import hashlib
import base64
from pyDes import *
data = '000000000000000000000000000000'
#key = '48C3B4286FF421A4A328E68AD9E542A4'
key = 'E6F1081FEA4C402CC192B65DE367EC3E'
key = binascii.unhexlify(key)
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
@yigityus
yigityus / query.java
Created July 14, 2016 09:00
query db
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 {

Backend Architectures

ARCHITECTURES

ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats