Skip to content

Instantly share code, notes, and snippets.

Dede Hamzah dehamzah

Block or report user

Report or block dehamzah

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dehamzah
dehamzah / .eslintrc
Created Jun 6, 2018
ES Lint Setup for React Native
View .eslintrc
{
"parser": "babel-eslint",
"env": {
"browser": true
},
"plugins": [
"react",
"react-native"
],
"ecmaFeatures": {
View gist:346dfdd5c3dc23281cce8e638cd15869
> $ gulp ⬡ 8.9.4 [±master ●●]
[07:03:45] Using gulpfile /media/dehamzah/ssd/projects/projects/bps-satu-data/satudata-mobile-ionic/gulpfile.js
[07:03:45] Starting 'sass'...
[07:03:45] Starting 'index'...
[07:03:45] Starting 'scripts'...
[07:03:45] Starting 'styles'...
[07:03:45] Starting 'clean-templates'...
[07:03:45] Starting 'clean-images'...
[07:03:45] Starting 'lib'...
info: Preening: ngCordova
View install-docker-on-linux-mint-18.sh
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/andrewelkins/1adc587feb610f586f8f40b50b7efc3a/install-docker-on-linux-mint-18.sh | bash -x
##########################################
# Kernel version http://stackoverflow.com/a/4024263
versionlte() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
versionlt() {
@dehamzah
dehamzah / pagination.js
Created Jan 22, 2018
Pagination like github
View pagination.js
function getDisplayedPages(currentPage, pagesArr) {
/*
Will return 5 total pages, with current page in the middle.
*/
var lastPage = pagesArr.length;
var first = (Math.sign(currentPage - 3) === -1) ? 0 : currentPage - 3;
var last = currentPage + 2;
if (currentPage > lastPage) return;
@dehamzah
dehamzah / err.log
Created Dec 11, 2017
Error running: sudo /edx/bin/update edx-platform open-release/ginkgo.master
View err.log
[edxapp : add gunicorn configuration files] *******************************
ok: [localhost] => (item=lms)
ok: [localhost] => (item=cms)
TASK [edxapp : enable {{ item }} supervisor script] ****************************
ok: [localhost] => (item=lms)
ok: [localhost] => (item=cms)
TASK [edxapp : enable edxapp supervisor script] ********************************
ok: [localhost]
@dehamzah
dehamzah / err.log
Created Dec 11, 2017
Failed when running ginkgo.1.patch-wiki
View err.log
TASK [edxapp : migrate] ********************************************************
failed: [localhost] (item=lms) => {"changed": true, "cmd": ["/edx/bin/edxapp-migrate-lms"], "delta": "0:00:00.985133", "end": "2017-12-10 22:57:05.835998", "f
ailed": true, "item": "lms", "rc": 1, "start": "2017-12-10 22:57:04.850865", "stderr": "Traceback (most recent call last):\n File \"manage.py\", line 111, in
<module>\n startup = importlib.import_module(edx_args.startup)\n File \"/usr/lib/python2.7/importlib/__init__.py\", line 37, in import_module\n __impo
rt__(name)\n File \"/edx/app/edxapp/edx-platform/lms/startup.py\", line 12, in <module>\n settings.INSTALLED_APPS # pylint: disable=pointless-statement\n
File \"/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py\", line 48, in __getattr__\n self._setup(name)\n File \"/e
dx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/__init__.py\", line 44, in _setup\n self._wrapped = Settings(settings_mo
@dehamzah
dehamzah / err.log
Created Dec 10, 2017
Error when running sandbox.sh twice. using ginkgo.master
View err.log
TASK [mongo : Create super user with js] ***************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/bin/mongo admin /tmp/create_root.js", "delta": "0:00:00.046135", "end": "2017-12-10 18:07:16.602
854", "failed": true, "rc": 253, "start": "2017-12-10 18:07:16.556719", "stderr": "", "stderr_lines": [], "stdout": "MongoDB shell version: 2.6.12\nconnecting
to: admin\nError: 18 { ok: 0.0, errmsg: \"auth failed\", code: 18 }\n2017-12-10T18:07:16.601+0000 Error: not authorized on admin to execute command { usersIn
fo: \"admin\" } at src/mongo/shell/db.js:1342\nfailed to load: /tmp/create_root.js", "stdout_lines": ["MongoDB shell version: 2.6.12", "connecting to: admin",
"Error: 18 { ok: 0.0, errmsg: \"auth failed\", code: 18 }", "2017-12-10T18:07:16.601+0000 Error: not authorized on admin to execute command { usersInfo: \"ad
min\" } at src/mongo/shell/db.js:1342", "failed to load: /tmp/create_root.js"]}
to retry, use: --limit @/var/tmp/configuration/playbooks/edx
@dehamzah
dehamzah / err.log
Last active Dec 10, 2017
Error installing ficus.master on AWS
View err.log
TASK [notifier : Check if incommon ca is installed] ****************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["test", "-e", "/usr/share/ca-certificates/incommon/InCommonServerCA.crt"], "delta": "0:00:00.003425",
"end": "2017-12-10 09:49:10.940451", "failed": true, "rc": 1, "start": "2017-12-10 09:49:10.937026", "stderr": "", "stdout": "", "stdout_lines": [], "warning
s": []}
...ignoring
TASK [notifier : Create incommon ca directory] *********************************
changed: [localhost]
@dehamzah
dehamzah / err.log
Created Dec 10, 2017
Error installing ginkgo.master
View err.log
/edxval/models.py:164: RemovedInDjango19Warning: Model class edxval.models.Subtitle doesn't declare an explicit app_label and either isn't in an appl[10/1472]
n INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.", " class Subtitle(models.Model):",
"", "2017-12-09 23:49:30,825 WARNING 12111 [py.warnings] base.py:116 - /edx/app/edxapp/edx-platform/openedx/core/djangoapps/video_config/models.py:10: Removed
InDjango19Warning: Model class openedx.core.djangoapps.video_config.models.HLSPlaybackEnabledFlag doesn't declare an explicit app_label and either isn't in an
application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.", " class HLSPlaybackE
nabledFlag(ConfigurationModel):", "", "2017-12-09 23:49:30,826 WARNING 12111 [py.warnings] base.py:116 - /edx/app/edxapp/edx-platform/openedx/core/djangoapps/
video_config/models.py:51: RemovedInDjango19Warning: Model class opened
You can’t perform that action at this time.