Skip to content

Instantly share code, notes, and snippets.

View dehamzah's full-sized avatar
🦉
Morning Owl

Dede Hamzah dehamzah

🦉
Morning Owl
View GitHub Profile
@dehamzah
dehamzah / mako.html
Last active April 17, 2016 14:06 — forked from ariestiyansyah/mako.html
Navigation Responsive
## mako
<%namespace name='static' file='static_content.html'/>
<%namespace file='main.html' import="login_query, stanford_theme_enabled"/>
<%!
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from microsite_configuration import microsite
from microsite_configuration.templatetags.microsite import platform_name
from ccx.overrides import get_current_ccx
@dehamzah
dehamzah / update-assets-open-edx.sh
Created July 2, 2016 00:12
Bash script i use to update assets static files when developing custom theming open edx using stanford theming method.
#!/bin/bash
#move to folder themes
cd /edx/app/edxapp/themes/<change-to-your-theme>/
echo "inside /edx/app/edxapp/themes/<change-to-your-theme>/"
#switch to user edxapp
sudo -H -u edxapp bash << EOF
echo "Now as: "
whoami
@dehamzah
dehamzah / take_a_break.py
Last active August 29, 2016 14:15
This program will remind you to take a break and drink some water every 2 hours
#!/usr/bin/env python
import webbrowser
import time
# Video 'Are You Drinking Enough Water?'
url = 'https://www.youtube.com/watch?v=QMi3xA-5KbE'
start_count = 0
total_count = 8
# 2 Hours
@dehamzah
dehamzah / secret_messages.py
Created August 31, 2016 12:06
Renaming bulk files by removing any number in file names.
#!/usr/bin/python
# Program for remove number from file names in targeted folder
import os
# Set target directory where the files resides
target_dir = r"/your/path/to/folder/here"
'''
r stands for rawpack. it means to tell python take this string as it is.
@dehamzah
dehamzah / rename_obfuscate.py
Created August 31, 2016 14:23
Program for prefix and suffix number in file names in targeted folder
#!/usr/bin/python
# Program for prefix and suffix number in file names in targeted folder
import os
import random
# Set target directory where the files resides
target_dir = r"/Users/darthmako/Documents/playground/udacity-python-foundation/secret-messages"
'''
@dehamzah
dehamzah / update.sh
Created September 5, 2016 04:07
Bash script that i use to update static assets when developing themes open edx using comprehensive theme method.
#!/bin/bash
# switch to user edxapp to update assets
sudo -H -u edxapp bash << EOF
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/edx-platform
paver update_assets lms --settings=aws --debug
EOF
# restart the lms instance
@dehamzah
dehamzah / blast-ix-konfirmasi-pembayaran.html
Created November 28, 2016 02:41
Subject: UPDATE: Registrasi dan Konfirmasi Pendaftaran Seminar The Art of Startup
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>IndonesiaX</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400);</style>
</head>
provinces = [
{
"name": "aceh",
"label": "Aceh",
"regencies": [
{
"name": "kabupaten-simeulue",
"label": "Kabupaten Simeulue"
},
{
provinces = [
{
"name": "aceh",
"label": "Aceh",
"regencies": [
{
"name": "kabupaten-simeulue",
"label": "Kabupaten Simeulue"
},
{
@dehamzah
dehamzah / gist:be77114408995fdddc37e0e1ca3d9b0c
Created December 20, 2016 02:32 — forked from learncodeacademy/gist:5850f394342a5bfdbfa4
SSH Basics - Getting started with Linux Server Administration

###SSH into a remote machine###

ssh user@mydomain.com
#or by ip address
ssh user@192.168.1.1

exit: exit ###Install Something###

#If it's a new server, update apt-get first thing