Skip to content

Instantly share code, notes, and snippets.

Recai Oktaş roktas

Block or report user

Report or block roktas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Makefile
# Hepsini yap
all:
cd ../.. && docker build -f src/rails/Dockerfile .
View yalign
#!/usr/bin/env ruby
# frozen_string_literal: true
class Aligner
LINE = /
(?:^|\A) # beginning of line
(?<lhs>\s*[^#:]+:) # lhs
(?:\s*) # optional space
(?<rhs>\S.*) # rhs
View seeds.rb
# frozen_string_literal: true
require 'pg'
# Untested
module Nokul
module Support
class PgExec
def initialize(**options)
@options = { bypass_triggers: true }.merge options
View nginx.conf
http {
# Each unique IP address will be limited to 10 requests per second.
# They cannot make a request for that URL within 100 milliseconds of its previous one.
limit_req_zone $binary_remote_addr zone=limit_req:10m rate=10r/s;
# Limit a single IP address to make no more than 100 connections within 1 minute.
limit_conn_zone $binary_remote_addr zone=limit_conn:1m;
limit_conn limit_conn 100;
server {
View flat.yml
medley/paas:
medley: paas
provision: |-
bash -e < <(curl -fsSL https://scripts.omu.sh) paas
medley/vanilla:
medley: vanilla
provision: |-
View t.rb
# frozen_string_literal: true
# Something
class Something
def initialize(**options)
extend Verbose if options[:verbose]
end
def report
puts 'short'
View codification.rb
# frozen_string_literal: true
module Nokul
module Tenant
module Codification
mattr_accessor :const, default: ActiveSupport::InheritableOptions.new(
user_name_suffix_length: 3,
student_number_gross_length: 8,
student_number_year_length: 2,
unit_code_gross_length: 3
View object.rb
# frozen_string_literal: true
class Object
def to_yaml_pretty
yaml = to_yaml line_width: -1
yaml.gsub!(/\s+$/, '')
yaml.gsub!("\n-", "\n\n-")
yaml.gsub!(/^( +)-/, '\\1 -')
yaml << "\n"
end
View t.rb
# frozen_string_literal: true
def suspicious?(content)
re = /
(
(master_(key))
|
(access_(token|key))
|
(secrets_(key))
View t.rb
# frozen_string_literal: true
def suspicious?(content)
re = /
(
(master_(key))
|
(access_(token|key))
|
(secrets_(key))
You can’t perform that action at this time.