Skip to content

Instantly share code, notes, and snippets.

View dedy-purwanto's full-sized avatar

Dedy Purwanto dedy-purwanto

  • Pekanbaru, Indonesia
  • 06:25 (UTC +07:00)
View GitHub Profile
@dedy-purwanto
dedy-purwanto / download_class_dojo_archive.py
Created April 11, 2020 17:08
Download all photos and videos from your Class Dojo account
"""
Download all ClassDojo photos and videos in your timeline.
by kecebongsoft
How it works:
1. Fetch list of items in the timeline, if there are multiple pages, it will fetch for all pages.
2. Collect list of URLs for the attachment for each item
3. Download the files into local temporary directory, and also save the timeline activity as a json file.
from itertools import permutations
print '\n'.join(['%s?' % ' '.join(s) for s in permutations("kamu mau makan malam apa".split())])
"""
>>>
kamu mau makan malam apa?
kamu mau makan apa malam?
kamu mau malam makan apa?
kamu mau malam apa makan?
kamu mau apa makan malam?
@dedy-purwanto
dedy-purwanto / _readme.md
Last active August 29, 2015 14:15 — forked from shime/_readme.md

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc
"""It's a hack for solr backend to apply django-style random ordering
with '?'. Change haystack/backends/solr_backend.py
"""
# .. Somewhere in the beginning
import random
# .. Somewhere in :638, replace content of for-loop into these:
if order_by.startswith('-'):
order_by_list.append('%s desc' % order_by[1:])
elif order_by.startswith('?'):
@dedy-purwanto
dedy-purwanto / gist:11312110
Created April 26, 2014 05:00
Bulk remove iTerm2 color schemes.
# There was a day where I have too many color schemes in iTerm2 and I want to remove them all.
# iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one.
# iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format
# What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files.
$ cd /tmp/
$ cp ~/Library/Preferences/com.googlecode.iterm2.plist .
$ plutil -convert xml1 com.googlecode.iterm2.plist
$ vi com.googlecode.iterm2.plist
class BananaModelSerializer(object):
@property
def errors(self):
err = super(BananaModelSerializer, self).errors
if err:
new_err = dict( detail='validation error', code='validation-error', errors=err,)
return new_err
<div id='mobile'>{% load inquiry_inline %}
<div style='text-align:center' align='center'>
<img src='https://dk0kblssebjoq.cloudfront.net/media/picture/2013/09/17/logo.png'>
<div class='banner1-heading lightblue2'>KEUNGGULAN NILAI UNIVERSITY</div>
<ul class='checkmarklist'>
<li><span>&nbsp;</span>Universitas dengan peringkat 5 (Excellent) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oleh badan SETARA, Malaysia.</li>
<li><span>&nbsp;</span>Kolaborasi dengan Universitas International</li>
<li><span>&nbsp;</span>Fasilitas dengan standard International</li>
<li><span>&nbsp;</span>Suasana Global dengan mahasisawa internasional <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yang berasal dari lebih 50 negara</li>
</ul>
b73s9c8310cb
aisah,leadershipresources_aisah
alpa,leadershipresources_alpa
ana,leadershipresources_ana
anand,leadershipresources_anand
annie,leadershipresources_annie
asnija,leadershipresources_asnija
babu,leadershipresources_babu
bounces,leadershipresources_bounces
bugh,leadershipresources_bugh
chong,leadershipresources_chong