start new:
tmux
start new with session name:
tmux new -s myname
| import sublime | |
| import sublime_plugin | |
| class ToggleVintageous(sublime_plugin.WindowCommand): | |
| def run(self): | |
| setts = sublime.load_settings('Preferences.sublime-settings') | |
| ignored = setts.get('ignored_packages') | |
| launch_status = False |
| Package Control: Fetching list of available packages | |
| Platform: linux-x64 | |
| Sublime Text Version: 3047 | |
| Package Control Version: 2.0.0-alpha7 | |
| theme loaded | |
| Package Control: Unable to find a sublime-package file for SublimeGit | |
| Package Control: Unable to find file package-metadata.json in the package SublimeGit | |
| Package Control: Download Debug | |
| URL: http://release.sublimegit.net/SublimeGit.sublime-package | |
| Resolved IP: 192.155.92.235 |
| def side_by_side_brute(items): | |
| # can all the books fit? | |
| if max_height(items) > MAX_HEIGHT or max_width(items) > MAX_WIDTH: | |
| return False | |
| # is the volume ok? | |
| if total_volume(items) >= MAX_HEIGHT * MAX_WIDTH * MAX_DEPTH: | |
| return False | |
| # we are dealing with factorials here... 10! is 3.6 mio options |
| def side_by_side_simple(items): | |
| if max_height(items) > MAX_HEIGHT or max_width(items) > MAX_WIDTH: | |
| return False | |
| if total_depth(items) <= MAX_DEPTH: | |
| return True | |
| pairs = permutations(items, 2) | |
| stackable_pairs = [] | |
| for a, b in pairs: | |
| stackable = False |
| # /etc/nginx/sites-enabled/magento | |
| server { | |
| listen 80; | |
| server_name ec2-184-72-68-219.compute-1.amazonaws.com; | |
| root /var/www/magento/; | |
| access_log /var/log/nginx/magento-access_log; | |
| error_log /var/log/nginx/magento-error_log; | |
| location / { |
| upstream qrr_app { | |
| server 127.0.0.1:8080 fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| server_name app.qrr.dk; | |
| keepalive_timeout 5; |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| ) | |
| type DatetimeCondition struct { | |
| From *float32 | |
| To *float32 |
| if (expiry_month.length == 1) { | |
| expiry_month = '0' + expiry_month; | |
| $('.card-expiry-month').val(expiry_month); | |
| } | |
| if (expiry_year.length == 2) { | |
| expiry_year = '20' + expiry_year; | |
| $('.card-expiry-year').val(expiry_year); | |
| } |
| function detect_card_type(card_number) { | |
| if (!_.isString(card_number) || _.isEmpty(card_number.trim())) { | |
| return null; | |
| } | |
| c = card_number.trim(); | |
| // http://en.wikipedia.org/wiki/List_of_Issuer_Identification_Numbers | |
| if (/^[1-2]/.test(c)) return 'airline'; | |
| if (/^3[06]/.test(c)) return 'diners'; | |
| if (/^3[47]/.test(c)) return 'amex'; |