- code is debt (and bad code is a unhedged call option)
- our users dont care about the code
- every line of code has costs (your time, readability, maintainability, complexity)
- its like owning a house with lots of rooms. its nice when your friends come over once a month, but you pay rent every day
- dont add features unless you're sure it is necessary
- dont optimize prematurely
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| class.Diff.php | |
| A class containing a diff implementation | |
| Created by Stephen Morley - http://stephenmorley.org/ - and released under the | |
| terms of the CC0 1.0 Universal legal code: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Vendor\Library; | |
| use function bin2hex; | |
| use function hex2bin; | |
| use function openssl_decrypt; | |
| use function openssl_encrypt; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Note: Run from project root | |
| # From: https://stackoverflow.com/a/41386937/1853298 | |
| python -c "import pathlib; [p.unlink() for p in pathlib.Path('.').rglob('*.py[co]')]" | |
| python -c "import pathlib; [p.rmdir() for p in pathlib.Path('.').rglob('__pycache__')]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| SET SVN_DIR=C:\webserver\SVN\QA\Automation\Master | |
| SET FILE_PREFIX=QA | |
| SET BU_DIR="C:\Users\yuval\OneDrive - Qmarkets\work backup\Auto" | |
| IF NOT [%1] == [] (SET SVN_DIR=%1) | |
| IF NOT [%2] == [] (SET FILE_PREFIX=%2) | |
| IF NOT [%3] == [] (SET BU_DIR=%3) | |
| set CUR_YYYY=%date:~10,4% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tempfile | |
| import os | |
| import time | |
| import configparser | |
| import sys | |
| import wx | |
| def get_chrome_path_from_user(): | |
| app = wx.App(None) | |
| style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .____ .__ | |
| | | ____ ____ | |__ | |
| | | _/ __ \_/ ___\| | \ | |
| | |__\ ___/\ \___| Y \ | |
| |_______ \___ >\___ >___| / | |
| \/ \/ \/ \/ | |
| ____ __. | |
| | |/ _|____ __________ _____ ____ | |
| | < / _ \/ ___/ _ \ / \ / _ \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import itertools | |
| def find_all_combinations(numbers): | |
| ret = [] | |
| for L in range(0, len(numbers) + 1): | |
| for subset in itertools.combinations(numbers, L): | |
| if (len(subset)) > 0: | |
| ret.append(list(subset)) | |
| return ret |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ | |
| /* SHA-1 implementation in JavaScript (c) Chris Veness 2002-2014 / MIT Licence */ | |
| /* */ | |
| /* - see http://csrc.nist.gov/groups/ST/toolkit/secure_hashing.html */ | |
| /* http://csrc.nist.gov/groups/ST/toolkit/examples.html */ | |
| /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ | |
| /* jshint node:true *//* global define, escape, unescape */ | |
| 'use strict'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Notification> | |
| <NotificationMetaData> | |
| <NotificationType>AnyOfferChanged</NotificationType> | |
| <PayloadVersion>1.0</PayloadVersion> | |
| <UniqueId>4e3a2c04-5f63-4afb-8666-e480e83fae47</UniqueId> | |
| <PublishTime>2015-01-06T14:15:55.708Z</PublishTime> | |
| <SellerId>A2H6E05OPYV8CQ</SellerId> | |
| <MarketplaceId>ATVPDKIKX0DER</MarketplaceId> | |
| </NotificationMetaData> | |
| <NotificationPayload> |
