This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
about | |
acara | |
ada | |
adalah | |
adanya | |
adapun | |
aeur | |
after | |
agak | |
agaknya |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@jimmyromanticde | |
Note: | |
python 2.x Only | |
Problem: | |
Error browser log | |
XMLHttpRequest cannot load http://127.0.0.1:8000/visitor.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' | |
@jimmyromanticde | |
Problem | |
Find or Search text string in files | |
''' | |
DIRFOLDER = '/home/romanticdevil/myworkspace/Dj1.4/project/newversion1.0/titik_tanya' | |
import os, re | |
text = raw_input('string search: ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function create_costumer_key($length=8,$use_upper=1,$use_lower=1,$use_number=1,$use_custom=""){ | |
$upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
$lower = "abcdefghijklmnopqrstuvwxyz"; | |
$number = "0123456789"; | |
if($use_upper){ | |
$seed_length += 26; | |
$seed .= $upper; | |
} | |
if($use_lower){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function generateUrut($id) | |
{ | |
$tz_object = new DateTimeZone('Asia/Makassar'); | |
//date_default_timezone_set('Brazil/East'); | |
$datetime = new DateTime(); | |
$datetime->setTimezone($tz_object); | |
$dater = $datetime->format('Ymd'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@jimmyromanticde | |
Note: | |
python 2.x Only | |
Django >= 1.4 | |
Problem: | |
1. django cannot remove files when deleting an objects in models/database | |
2. django cannot update/replace/delete files when updating an objects in models/database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
Problem: | |
Server Nginx | |
Django | |
Unhandled Exception An unhandled exception was thrown by the application. | |
" | |
The Story when i try to deploy a new code in new staging server on aws ec2. | |
i was intalling anything before. library, dependency and etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Problem: | |
How to Convert PDF to Image with Python Script ? | |
Installation: | |
I use ubuntu OS 14.04 | |
We use wrapper for ImageMagick [http://www.imagemagick.org/script/index.php] to Convert The PDF file | |
in Python do: | |
$ sudo apt-get install libmagickwand-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Penjelasan Singkat tentang POST & GET Django | |
POST GET | |
Nilai variabel tidak ditampilkan di URL | Nilai variabel ditampilkan di URL sehingga user dapat dengan mudah memasukkan nilai | |
| variabel baru | |
Lebih aman | Kurang aman | |
Tidak dibatasi panjang string | Dibatasi panjang string sampai 2047 karakter | |
Pengambilan variabel dengan request.POST.get | Pengambilan variabel dengan request.POST.get | |
Biasanya untuk input data melalui form | Biasanya untuk input data melalui link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Original Version from | |
dgouldin https://gist.github.com/dgouldin/634534 | |
Modify by jimmyromanticde | |
Problem: | |
'module' object has no attribute 'module' object has no attribute 'TOKEN_TEXT' | |
""" |
OlderNewer