Skip to content

Instantly share code, notes, and snippets.

View tasdikrahman's full-sized avatar
💭
Automate everything

Tasdik Rahman tasdikrahman

💭
Automate everything
View GitHub Profile
@tasdikrahman
tasdikrahman / my_resume.md
Created January 7, 2016 16:23
Renders my resume link in the way the browser renders it on the page, not the full view
layout title
page
Contact/Resume

This page contains a copy of my resume, my email is readme.py@gmail.com.

@tasdikrahman
tasdikrahman / ffmpeg_hacks.md
Created January 20, 2016 19:59
FFMPEG hacks

Get a screenshot of video at a particular time frame

Create a directory called frames in the same directory with your .mp4 file. Use command:

ffmpeg -i video.mp4  -r 5 'frames/frame-%03d.jpg'
@tasdikrahman
tasdikrahman / img_optimization.md
Last active January 21, 2016 04:47
Image optimization in command line

Optimizion JPEG's

$ jpegoptim filename.jpeg
$ jpegoptim [options] filename.jpeg

Forced compression

@tasdikrahman
tasdikrahman / students_peewee.py
Last active January 30, 2016 12:14
A simple demonstration of peewee's mode methods
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: tasdik
# @Date: 2016-01-26
# @Email: prodicus@outlook.com Github username: @prodicus
# @Last Modified by: tasdik
# @Last Modified time: 2016-01-30
# MIT License. You can find a copy of the License @
# http://prodicus.mit-license.org
@tasdikrahman
tasdikrahman / rst_cheatsheet.rst
Created February 16, 2016 14:22
ReStructured text cheatsheet. Because I keep forgetting it!

Inline Markup

Inline markup allows words and phrases within text to have character styles (like italics and boldface) and functionality (like hyperlinks).

:
@tasdikrahman
tasdikrahman / git_workflow.txt
Created February 16, 2016 16:25
adrianholovaty's(co-creator of Django) git workflow
##########
# BASICS #
##########
To make changes:
git add path/to/file1 path/to/file2
git commit -m "templates: Changed the XX template to do XX"
To push that to the central server (which makes it available for deployment):
@tasdikrahman
tasdikrahman / jupyter_notebook_cheatsheet.md
Last active February 21, 2016 05:58
A common list of keyboard shortcuts when using jupyter notebooks

The following are the keyboard shortcuts for an IPython Notebook. Learning to use these will help speed up your interactive shell development.

Command Mode (press Esc to enable)

Enter : enter edit mode

Shift-Enter : run cell, select below

Ctrl-Enter : run cell

@tasdikrahman
tasdikrahman / tmux.md
Last active March 2, 2016 16:12
Basic tmux usage

To detach your current session use C-b d. You can also use C-b D to have tmux give you a choice which of your sessions you want to detach.

Figure out which sessions are running by using

$tmux ls

This will give you a list of all running sessions,

To connect to that session you start tmux again but this time tell it which session to attach to:

@tasdikrahman
tasdikrahman / remove_mongo_lock.md
Last active March 2, 2016 16:13
MongoDB starting problem in Ubuntu

You started mongodb server, but No matter what. However, when you run sudo status mongodb again, you’ll get mongodb stop/waiting instead of mongodb start/running

Note: This condition is largely due to an unclean shutdown, and results in the creation of a lockfile /var/lib/mongodb/mongod.lock

The fix is a quick two-step process as follows:

Remove the lockfile. Run the repair script. This is accomplished as follows:

@tasdikrahman
tasdikrahman / git_reference.md
Last active March 19, 2016 19:32
A list of common git commands used by me. I know. I tend to forget them!