Skip to content

Instantly share code, notes, and snippets.

View federikovi's full-sized avatar
🚲

Federica Trevisan federikovi

🚲
  • Reply
  • Somewhere in the lagoon of Venice, sorrounded by water
  • 00:28 (UTC +02:00)
  • X @federikovi
View GitHub Profile
@cmfcmf
cmfcmf / Update, edit and develop Tumblr Theme dynamically.js
Last active July 29, 2019 15:39
Creating and developing own tumblr themes has always been a pitty. However, this single line of javascript will help you A LOT. Follow the instuctions in the first comment below to get your own live version of your theme.
setInterval(function(){jQuery.ajax('YOUR-URL-TO-THE-THEME-FILE',{cache:false}).success(function(html){var btn=jQuery("div[data-action='update_preview']").first();if(html!=ace.edit('editor').getValue()){ace.edit('editor').setValue(html);if(!btn.hasClass('disabled'))btn.click()}});},1000);
@thien
thien / Recursive SelectionSort
Last active September 16, 2020 06:15
A recursive SelectionSort algorithm written in python
def selection(list, i, j, flag):
size = len(list)
if (i < size - 1):
if (flag):
j = i + 1;
if (j < size):
if (list[i] > list[j]):
list[i], list[j] = list[j], list[i]
selection(list, i, j + 1, 0);
selection(list, i + 1, 0, 1);
<NotepadPlus>
<UserLang name="DAX2" ext="dax" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00-- 01 02 03% 04%</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>