Combine default parameters and destructuring for a compact version of the defaults / overrides pattern.
function foo ({
bar = 'no',
baz = 'works!'
} = {}) {
{ | |
"name": "OpenChat 3.5", | |
"load_params": { | |
"n_ctx": 8192, | |
"n_batch": 512, | |
"rope_freq_base": 10000, | |
"rope_freq_scale": 1, | |
"n_gpu_layers": 80, | |
"use_mlock": true, | |
"main_gpu": 0, |
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')
From here on out, use Package Control to install everything. ⌘
+Shift
+P
, then type Install
to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.
{"Aberdare": "Mid Glamorgan", "Aberdeen": "Aberdeenshire", "Aberdovey": "Gwynedd", "Abergavenny": "Gwent", "Abergele": "Clwyd", "Abertillery": "Gwent", "Aberystwyth": "Dyfed", "Abingdon": "Oxfordshire", "Accrington": "Lancashire", "Airdrie": "Lanarkshire", "Alcester": "Warwickshire", "Aldeburgh": "Suffolk", "Alderley Edge": "Cheshire", "Aldershot": "Hampshire", "Alfreton": "Derbyshire", "Alness": "Ross-shire", "Alnwick": "Northumberland", "Alresford": "Hampshire", "Alston": "Cumbria", "Alton": "Hampshire", "Altrincham": "Cheshire", "Ambleside": "Cumbria", "Amersham": "Buckinghamshire", "Amesbury": "Wiltshire", "Ammanford": "Carmarthenshire", "Andover": "Hampshire", "Anstruther": "Fife", "Antrim": "Co Antrim", "Appleby-in-Westmorland": "Cumbria", "Arbroath": "Angus", "Ardrossan": "Ayrshire", "Armagh": "Co Armagh", "Arthog": "Gwynedd", "Arundel": "West Sussex", "Ascot": "Berkshire", "Ashbourne": "Derbyshire", "Ashburton": "Devon", "Ashford": "Middlesex", "Ashington": "Northumberland", "Ashtead": "Surrey", "Asht |
$colours: | |
"red" #FF0000, | |
"blue" #001EFF, | |
"green" #00FF00, | |
"yellow" #F6FF00; | |
@each $i in $colours{ | |
.#{nth($i, 1)}-background { | |
background: nth($i, 2); | |
} |
<?php | |
function restore_ticket_csv_headers( $columns ) { | |
// Only meddle with the attendee csv export request | |
if ( ! isset( $_GET['attendees_csv'] ) ) return $columns; | |
// Tribe__Tickets__Tickets_Handler::instance() already owns an attendee | |
// table object but it is private and there is not currently an accessor | |
$attendees_table = new Tribe__Tickets__Attendees_Table(); |
// swap the keybindings for paste and paste_and_indent | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" } |
function transfer | |
if test (count $argv) -eq 0 | |
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md" | |
return 1 | |
end | |
## get temporarily filename, output is written to this file show progress can be showed | |
set tmpfile ( mktemp -t transferXXX ) | |
## upload stdin or file |