Skip to content

Instantly share code, notes, and snippets.

View efe's full-sized avatar

Efe Öge efe

View GitHub Profile
@bmatcuk
bmatcuk / create-usb.sh
Created May 30, 2019 04:38
Creating a Bootable Windows USB from ISO on a Mac
# First, we need to find our device. BEFORE inserting your USB drive, run the
# following:
diskutil list
# This will output a bunch of info about all of the disk drives connected to
# your Mac. Each entry will have a header in the form "/dev/diskX", where X is
# some number starting at 0. Now, insert your USB drive and run the command
# again. You should see a new entry. Make note of the name (ie, /dev/diskX).
diskutil list
@sbailliez
sbailliez / postgresql_11_upgrade.md
Last active May 7, 2021 14:11
Upgrading from Postgresql 10.6 to Postgresql 11.1

Spent a few hours dealing with errors on RDS when upgrading from a postgresql 10.6 to 11.1. In case someone else is dealing with the same problems, this might be helpful.

A few things to know about this database:

  • PostGIS extension was installed but was not being used
  • ip4r extension was installed but was also not used

This probably turned out to be a Good Thing (tm). If you are using PostGIS extensively, I wish you good luck.

Upgrades

@vural
vural / megep.md
Last active July 16, 2025 00:39
Megep Dökümanları - 1. Liste
@igniteflow
igniteflow / mock-object-property.py
Created October 3, 2016 11:03
How to mock an object property in Python
import mock
with mock.patch('path.to.ObjectClass.my_property', new_callable=mock.PropertyMock) as mock_my_property:
mock_my_property.return_value = 'my value'
@ionelmc
ionelmc / .gitignore
Last active February 12, 2020 09:26
A JSON parser benchmark. See README.rst for instructions.
*.cbor
*.log
*.xml
*.yaml
*.json
*.msgpack
*.html
*.marshal
*.pickle
.tox
@eren
eren / install-tinyproxy.sh
Created April 6, 2015 12:32
Twitter'a erismek icin proxy sunucusu kurulumu
#!/bin/bash
#
# Eren Turkay <turkay.eren@gmail.com>
# 2015-04-06
#
# Sunucunuza twitter'a erismek icin proxy kurar. Twitter ayarlarindan
# tinyproxy'nin oldugu sunucunun IP adresini ve 8888 portunu HTTP Proxy olarak
# belirleyin.
#
# Telefonda VPN cok pil tukettiginden basit bir proxy sunucusu ile twitter'a

Falsehoods programmers believe about prices

  1. You can store a price in a floating point variable.
  2. All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
  3. All currencies are subdivided in decimal units (like dinar/fils)
  4. All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
  5. All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
  6. Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
  7. For any currency you can have a price of 1. (ZWL)
  8. Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)