Skip to content

Instantly share code, notes, and snippets.

View solanoize's full-sized avatar

Solanoize solanoize

View GitHub Profile
@solanoize
solanoize / Client
Created January 8, 2015 01:42
client XMLRPC for android Python
import xmlrpclib
server = raw_input("Server IP : ")
username = raw_input("USERNAME : ")
email = raw_input("EMAIL : ")
servAddr = "http://%s:8080" % server
s = xmlrpclib.ServerProxy(servAddr)
@solanoize
solanoize / IntentIntegrator.java
Created July 30, 2015 13:03
Kode untuk IntentIntegrator.java (Apache License):
package com.example.BarcodeTest;
/*
* Copyright 2009 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
"""
Quick Start - Create Content Post.
check out -- https://python-wordpress-xmlrpc.readthedocs.org/en/latest/overview.html#quick-start
"""
from wordpress_xmlrpc import Client
from wordpress_xmlrpc import WordPressPost
from wordpress_xmlrpc.methods.posts import GetPosts
from wordpress_xmlrpc.methods.posts import NewPost
from wordpress_xmlrpc.methods.users import GetUserInfo
@solanoize
solanoize / coding_login.py
Created August 31, 2015 20:40
Aplikasi Wordpress Easy Posting - Fitur Login - Coding Login - https://trello.com/b/m09ayBut/aplikasi-wordpress-easy-posting
from wordpress_xmlrpc import Client
from wordpress_xmlrpc.methods.users import GetUserInfo
# login
wp_url = "https://yourblogname.wordpress.com/xmlrpc.php"
wp_user = "usernamewp"
wp_pass = "passwordwp"
wp = Client(wp_url, wp_user, wp_pass)
try:
@solanoize
solanoize / coding_post_list.py
Created August 31, 2015 21:31
Aplikasi Wordpress Easy Posting - Fitur Post - Coding Post New - https://trello.com/c/l3rI8X5w
# Menampilkan seluruh postingan
# -----------------------------
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods.posts import GetPosts
import pprint
# login
wp_url = "https://yourblogname.wordpress.com/xmlrpc.php"
wp_user = "usernamewp"
@solanoize
solanoize / admin.md
Created October 10, 2015 15:19
membuat validasi quantity di model `DetilPenjualan` untuk `jumlah` pesanan dan `Barang` untuk `stok` saat mencatat detil penjualan barang dengan `Nota`

File penjualan/admin.py

Bagian Import

from django.contrib import admin
from django.contrib.admin import AdminSite
from django.core.exceptions import ValidationError
from django import forms
@import url(http://fonts.googleapis.com/css?family=Muli);
body {
margin:0;
padding:0;
font-family:helvetica, sans-serif;
}
p {
line-height: 1.8;
@solanoize
solanoize / base.css
Last active July 18, 2016 03:20
Chapter 01, 02, 03 - Django By Example
body {
margin:0;
padding:0;
font-family:helvetica, sans-serif;
}
a {
color:#00abff;
text-decoration:none;
}
@solanoize
solanoize / base.css
Created July 18, 2016 03:18
Chapter 04 - Django By Example - CSS File
@import url(http://fonts.googleapis.com/css?family=Muli);
body {
margin:0;
padding:0;
font-family:helvetica, sans-serif;
}
p {
line-height: 1.8;
@solanoize
solanoize / models.py
Created July 20, 2016 14:39
Base Model Sistem Absensi Siswa
from django.db import models
from django.utils import timezone
class Kelas(models.Model):
kelas = models.CharField(max_length=32, unique=True)
def __str__(self):
return self.kelas