Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Batuhan Bayrakci baybatu

🏠
Working from home
View GitHub Profile
@baybatu
baybatu / sound-restart.sh
Created Jan 14, 2021
restart sound nanesi on macos
View sound-restart.sh
#!/bin/bash
sudo kill -9 `ps ax|grep 'coreaudio[a-z]' | awk '{print $1}'
@baybatu
baybatu / mjml-responsive-mails.md
Created Dec 25, 2020
MJML : Markup language for responsive mails
View mjml-responsive-mails.md
@baybatu
baybatu / finagle-http2-frame-logger.md
Last active Dec 24, 2020
Log http2 frames on a finagle service
View finagle-http2-frame-logger.md
import com.twitter.finagle.http2.param.FrameLoggerNamePrefix
val service =
        Http
          .client
          .withLabel("service-label")
          .configured(FrameLoggerNamePrefix(this.getClass.getName))
          .withHttp2
          .newService("localhost:8080")
@baybatu
baybatu / docker-overwrite-entrypoint.md
Last active Dec 17, 2020
Run command in a docker container without running entrypoint
View docker-overwrite-entrypoint.md
@baybatu
baybatu / log4j2-logstash-flink-configuration.md
Last active Dec 25, 2020
log4j2 example logstash configuration for flink 1.11
View log4j2-logstash-flink-configuration.md
@baybatu
baybatu / get-huawei-oauth2-token.md
Last active Dec 8, 2020
Get Huawei oauth2 token
View get-huawei-oauth2-token.md
curl --location --request POST 'https://oauth-login.cloud.huawei.com/oauth2/v3/token' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode 'client_secret=CLIENT_SECRET' \
  --data-urlencode 'client_id=CLIENT_ID'

CLIENT_SECRET: 'App Secret' field on Huawei UI

@baybatu
baybatu / parse-iso8601-format-bigquery.md
Created Nov 27, 2020
Parse ISO8601 format in BigQuery
View parse-iso8601-format-bigquery.md
@baybatu
baybatu / active-forks.md
Created Oct 28, 2020
Find most active github forks easily
@baybatu
baybatu / netscaler-cors-policy.txt
Last active Sep 17, 2020
Netscaler CORS configuration policy for multiple domains with their subdomains
View netscaler-cors-policy.txt
add policy patset CORS_origins_allowed
bind policy patset CORS_origins_allowed .validdomain1.com -index 1
bind policy patset CORS_origins_allowed .validdomain2.com -index 2
add responder action CORS_deny_response respondwith q{"HTTP/1.0 401 Unauthorized CORS\r\n\r\n"} -bypassSafetyCheck YES
add responder policy CORS_origin_denied `!(HTTP.REQ.HEADER("Origin").EXISTS && HTTP.REQ.HEADER("Origin").TYPECAST_HTTP_URL_T.HOSTNAME.CONTAINS_ANY("CORS_origins_allowed"))` CORS_deny_response
You can’t perform that action at this time.