Skip to content

Instantly share code, notes, and snippets.

How it would work
People will still use facebook to organize trades: the only difference is that to verify the accounts and have middlemen, they need to follow this procedure:
- People have to create their account on School Idol Tomodachi and add their cards (at least URs + SRs)
- When they click on "Give away your account" or "Trade your account", they get a form:
- They have to upload a screenshot of their transfer code or write down their transfer code
- They can select whether they want to organize the giveaway on School Idol Tomodachi or somewhere else
{
'max_stats':{
'Smile':5380,
'Pure':5340,
'Cool':5350
},
'total_cards':857,
'years':[
u'Second',
u'First',
@db0company
db0company / remove_spaces
Created April 28, 2016 10:10
Replace spaces in all files in a folder with underscores
for f in *\ *; do mv "$f" "${f// /_}"; done
@db0company
db0company / backgrounds.sh
Created April 18, 2016 14:31
Sukutomo: Add the white halo around background and resize them to use on the homepage
# download all image in current folder, copy hover in /tmp/hover
for f in *\ *; do mv "$f" "${f// /_}"; done # remove space in filenames
mkdir small
mkdir large
i=0; for img in *.png; do composite -gravity Center /tmp/hover.png $img small/background$i.png; i=$((i+1)); done
cd small
for img in *.png; do convert $img -resize 1500x1500 ../large/$img; done
@db0company
db0company / total_comments_disqus.py
Created March 7, 2016 23:09
Get the total number of comments in a Disqus forum
import urllib2, json
api_key = 'your_disqus_api_key'
forum = 'your_forum_shortname'
f = urllib2.urlopen('https://disqus.com/api/3.0/forums/listThreads.json?api_key=' + api_key + '&forum=' + forum + '&limit=100')
data = json.loads(f.read())
total = 0
for thread in data['response']:
@db0company
db0company / duplicate_milestones.py
Created March 7, 2016 22:58
Script to duplicate milestones from a repo to another one on GitHub easily
# Get agithub.py from https://github.com/jpaugh/agithub
from agithub import Github
username = 'yourusername'
password = 'yourpassword'
from_owner = username # Can be an organization
from_repo = 'yourrepo'
to_owners = [username, username] # Can be organizations
@db0company
db0company / create_github_issues.py
Last active March 7, 2016 22:52
Script to create multiple opened/closed issues on GitHub easily
# Get agithub.py from https://github.com/jpaugh/agithub
from agithub import Github
username = 'yourusername'
password = 'yourpassword'
owner = username # Can be an organization
repo = 'YourRepo'
assignee = username
labels = ['task']
@db0company
db0company / remove_background.sh
Created March 1, 2016 03:04
Turn a white background into a transparent background
convert image.png -bordercolor white -border 1x1 -alpha set -channel RGBA -fuzz 20% -fill none -floodfill +0+0 white -shave 1x1 image.png
@db0company
db0company / svgtopng.sh
Created February 28, 2016 00:30
Convert svg to png
inkscape -z -e test.png -w 1024 -h 1024 test.svg
@db0company
db0company / Markdown Cheat Sheet.md
Created December 3, 2015 19:45
Markdown cheat sheet

Bold text

Italic text

Link

Quote

Title (Works with 1 to 6 #, 1 is bigger, 6 is smaller)