Skip to content

Instantly share code, notes, and snippets.

View maxd's full-sized avatar
🏠
Working from home

maxd

🏠
Working from home
  • Amsterdam, Netherlands
View GitHub Profile
@maxd
maxd / modena.css
Last active March 13, 2024 22:47
modena.css from JDK 10.0.1
/*
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@maxd
maxd / teamcity
Last active November 11, 2021 16:28
Startup script for TeamCity (put it to /etc/init.d/teamcity)
#!/bin/sh
# /etc/init.d/teamcity - Startup script for TeamCity
#
#
# Register the startup script to run automatically:
#
# sudo update-rc.d teamcity defaults
#
# required installation of realpath
ROOT_PATH=$(realpath "$(dirname ${0})/../")
ROOT_PATH=$(cd `dirname "$0"` && cd .. && pwd)
@maxd
maxd / gist:1164357adbc9dcecffbfa2311d9dc5db
Created December 13, 2020 19:37
Uber 3.434.10005.iap (Helix.app): List of bundles
Accelerators-Localizations-Helix.bundle
AddressEntryAccessories-Localizations-Helix.bundle
AudioRecording-Localizations-Helix.bundle
AuditRider-Localizations-Helix.bundle
AugmentedReality-Localizations-Helix.bundle
AugmentedRealityRider-Localizations-Helix.bundle
Authentication-Localizations-Helix.bundle
AuthenticationRider-Localizations-Helix.bundle
BiometricsVerification-Localizations-Helix.bundle
BugReporter-Localizations-Helix.bundle
@maxd
maxd / monitoring_output.txt
Created October 16, 2020 07:16
Monitoring output for https://github.com/espressif/esp-idf/issues/5980 with ESP-IDF from release/4.1 branch
➜ stack_trace_fault git:(master) ✗ idf.py reconfigure build
Executing action: reconfigure
Running cmake in directory /Users/mdobryakov/Projects/my/AGV/experiments/stack_trace_fault/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized -DIDF_TARGET=esp32 -DCCACHE_ENABLE=0 /Users/mdobryakov/Projects/my/AGV/experiments/stack_trace_fault"...
Warn about uninitialized values.
-- Found Git: /usr/local/bin/git (found version "2.26.0")
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /Users/mdobryakov/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
@maxd
maxd / db.1.rake
Created October 28, 2014 09:48
Rake task for drop active connections to PostgreSQL database
namespace :db do
namespace :drop do
task connections: :environment do
begin
database = ActiveRecord::Base.connection.current_database
ActiveRecord::Base.connection.execute(<<-SQL)
SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = '#{database}' AND pid <> pg_backend_pid();
SQL
@maxd
maxd / application.site
Last active December 10, 2016 07:27
sites-available/application.site
proxy_cache_path /tmp/???_nginx_cache keys_zone=???:512m inactive=2w;
server {
listen 8081;
error_log /var/log/nginx/???.error.log error;
access_log /var/log/nginx/???.access.log;
root /apps/???/current/public;
passenger_enabled on;
@maxd
maxd / radiustar_patch.rb
Created April 4, 2014 14:38
Patch to fix compatibility of radiustar with ruby 2.x
require 'radiustar'
module Radiustar
class Packet
def xor_str(str1, str2)
bstr1 = str1.unpack('C*')
bstr2 = str2.unpack('C*')
bstr1.zip(bstr2).map {|b1, b2| b1 ^ b2}.pack('C*')
import kotlin.reflect.KClass
inline operator fun <reified L : Any, reified R : Any> KClass<L>.compareTo(other: KClass<R>): Int {
return if (this === other) {
0
} else if (this.java.isAssignableFrom(other.java)) {
-1
} else if (other.java.isAssignableFrom(this.java)) {
1
} else {