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
# nginx.conf | |
upload_progress proxied 1m; | |
# /sites-available/default | |
upstream app_server { | |
server 127.0.0.1:8000 fail_timeout=0; | |
} | |
server { | |
listen 80; |
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
* ProgrammingError... relation... | |
-- backup data | |
-- dropdb dbname | |
-- createdb dbname | |
* coercing to Unicode: need string or buffer, Guru found | |
terjadi biasanya karena ada relasi bertingkat | |
-- def __unicode__(self): | |
return self.nama.nama | |
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
export using pgadmin | |
-- backup | |
-- format plain | |
-- dump options #1 : only data | |
-- dump options #2 : use column inserts | |
: use insert commands | |
sudo -u postgres -i | |
psql |
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
select nama,count(*) from infaq_siswa group by nama having count(*) > 1; |
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
Install latest version of forge source (1.8) | |
Upgrade java to 1.7 (latest) | |
# export JAVA_HOME="$(/usr/libexec/java_home -v 1.6)" | |
# export JVM_ARGS="-Xmx1024m -XX:MaxPermSize=256m" | |
gradlew setupDecompWorkspace | |
===== | |
Reference: |
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
Here are some of my notes on Laravel framework: | |
- it's better using homestead rather than using old-fashioned-setup-everything-individually. | |
- just always to create a copy of .env and name it something else like .env.example and filled up | |
with all app info except credential of course, this will make you ease the git clone pain. | |
- i don't know if once the app is deployed, do we need to do dependencies update? if yes, then | |
I suggest to do it first in localhost, using command: composer update :: if everythings goes | |
well, then you can do in your production server. |
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 | |
// App/Kholid/CustomPaginationLinks.php | |
namespace Kholid; | |
use Illuminate\Pagination\BootstrapThreePresenter; | |
class CustomPaginationLinks extends BootstrapThreePresenter { |
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
https://blog.openshift.com/use-flask-login-to-add-user-authentication-to-your-python-application/ |
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
<!-- source: http://stackoverflow.com/questions/18334717/how-to-upload-a-file-using-an-ajax-call-in-flask --> | |
<!-- yang perlu diingat, button yang untuk trigger dipisah dari form2 yang mau di-submit --> | |
<!-- html --> | |
<form id="upload-file" method="post" enctype="multipart/form-data"> | |
<fieldset> | |
<label for="file">Select a file</label> | |
<input name="file" type="file"> | |
</fieldset> | |
<fieldset> |
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
sudo apt-get install libxml2-dev libxslt1-dev lib32z1-dev python-dev python3-dev |