Skip to content

Instantly share code, notes, and snippets.

View swapab's full-sized avatar
🥌
I may be slow to respond.

Swapnil Abnave swapab

🥌
I may be slow to respond.
View GitHub Profile
@swapab
swapab / german-driving-license.md
Created January 16, 2024 10:23 — forked from blessanm86/german-driving-license.md
Quick Ref Notes for German Driving License Test

This is unmaintained and was created for personal use. As I passed the exam I have no use to keep this up to date. Feel free to fork

What are the consequences for a person driving a motor vehicle under the influence of drugs (e.g. hashish, heroin, cocaine)?

[x] Confiscation of driving licence or driving ban
[x] Compulsory medical/psychological examination
[x] Fine and/or imprisonment

In which instances do you have to approach a pedestrian crossing with particular care?

@swapab
swapab / braking.md
Created January 16, 2024 10:23 — forked from andrebq/braking.md
Fahrschule

Braking

Standard Braking Distance

  • DE: (Geschwindigkeit / 10) * (Geschwindigkeit / 10)
  • EN: (Speed / 10) * (Speed / 10)

Evasive (Emergency) Braking Distance

  • DE: ((Geschwindigkeit / 10) * (Geschwindigkeit / 10)) / 2
  • EN: ((Speed / 10) * (Speed / 10)) / 2

Rake:

centos7-devel :: ~/foreman ‹develop*› » rake test:foreman_bootdisk

.EEEE..EEE.......................

Finished in 6.314247s, 5.2263 runs/s, 9.5023 assertions/s.

  1) Error:

Keybase proof

I hereby claim:

  • I am swapab on github.
  • I am swapab (https://keybase.io/swapab) on keybase.
  • I have a public key whose fingerprint is 1D3D 8DA4 6D43 B1D5 41FF D53B 4458 15A8 125C 1C6B

To claim this, I am signing this object:

@swapab
swapab / gitter.md
Last active November 14, 2016 12:28

how to setup gitter server on hexchat/xchat

  1. Main Menu -> Network list -> Add

  2. Rename "New Network" to "GitterIM"

  3. Then "Edit" -> Servers Tab -> Add -> "irc.gitter.im"

  4. Check "Connect automatically"

  5. Check "Use SSL"

Please update your processor interface:
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from install at /home/vagrant/.rvm/gems/ruby-2.2.4/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/sprockets.rb:25)
Seeding /home/vagrant/foreman/db/seeds.d/03-auth_sources.rb
Seeding /home/vagrant/foreman/db/seeds.d/03-permissions.rb
Seeding /home/vagrant/foreman/db/seeds.d/03-roles.rb
Seeding /home/vagrant/foreman/db/seeds.d/04-admin.rb
Seeding /home/vagrant/foreman/db/seeds.d/05-taxonomies.rb
Seeding /home/vagrant/foreman/db/seeds.d/06-architectures.rb
Seeding /home/vagrant/foreman/db/seeds.d/07-provisioning_templates.rb
@swapab
swapab / gist:7944591
Last active December 31, 2015 05:59
real-time benchmark - total count
#Test data set - 100K
(1..100000).each do |t|
redis.zadd 'ZSORT', t.minutes.ago.to_i, "#{t}-minute-ago"
end
=========================================================================================
2.0.0p195 :210 > Benchmark.bmbm do |bm|
bm.report{
puts redis.eval("return #redis.call('zrangebyscore', 'ZSORT', #{11.months.ago.to_i}, #{1.months.ago.to_i})")
@swapab
swapab / gist:7943621
Last active December 31, 2015 05:49
zrangebyscore
# Test Dataset
2.0.0p195 :071 > t10
=> 1386935151
2.0.0p195 :072 > t20
=> 1386934568
2.0.0p195 :073 > t30
=> 1386933971
2.0.0p195 :074 > t40
=> 1386933374
- request:
method: get
uri: http://www.legalwins.com/refuse-breath-test-mi-dui-arrest.php
body:
encoding: US-ASCII
string: ''
headers:
User-Agent:
- Anemone/0.7.2
Referer: