Skip to content

Instantly share code, notes, and snippets.

Dipesh Acharya xtranophilist

Block or report user

Report or block xtranophilist

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
@xtranophilist
xtranophilist / provinces_districts.json
Created Apr 10, 2018
Provinces and Districts of Nepal [WIP]
View provinces_districts.json
[
{
"province": "1",
"name": "Sagarmatha",
"districts": [
"Bhojpur",
"Dhankuta",
"Ilam",
"Jhapa",
"Khotang",
@xtranophilist
xtranophilist / ubuntu_cleanup.sh
Created Apr 4, 2018
Ubuntu 16.04 Initial Cleanup
View ubuntu_cleanup.sh
sudo apt purge snapd ubuntu-core-launcher squashfs-tools
sudo apt-get purge --auto-remove friendly-recovery
sudo apt-get purge --auto-remove unattended-upgrades
sudo apt-get purge --auto-remove ureadahead
sudo apt-get purge --auto-remove apport
sudo systemctl disable apt-daily-upgrade.timer
sudo systemctl mask apt-daily-upgrade.service
sudo systemctl disable apt-daily.timer
sudo systemctl mask apt-daily.service
@xtranophilist
xtranophilist / pass.ods
Created Jan 14, 2018
LibreOffice Calc random password geenrator
View pass.ods
=CONCAT(INT(RAND()*10), CHAR(48+RAND()*10), INT(RAND()*10),CHAR(65+RAND()*26),INT(RAND()*1000),CHAR(97+RAND()*26),INT(RAND()*1000))
@xtranophilist
xtranophilist / saleor_wysiwyg_trumbowyg.md
Last active Oct 25, 2017
Saleor: Adding WYSIWYG to Product Description form in Dashboard
View saleor_wysiwyg_trumbowyg.md

Install trumbowyg

yarn add trumbowyg

Edit saleor/static/dashboard/js/dashboard.js

import 'trumbowyg/dist/trumbowyg.min.js';
import 'trumbowyg/dist/ui/trumbowyg.min.css';
import icons from 'trumbowyg/dist/ui/icons.svg';
View 1-uptime
#!/bin/sh
echo
exec /usr/bin/uptime
@xtranophilist
xtranophilist / dj_pagination_bootstrap4.html
Created Apr 13, 2017
Bootstrap 4 pagination template (partial) for dj-pagination
View dj_pagination_bootstrap4.html
{% load i18n %}
{% if is_paginated %}
<nav aria-label="navigation" class="p-3">
<ul class="pagination">
{% if page_obj.has_previous %}
<li class="page-item">
<a href="?page={{ page_obj.previous_page_number }}" aria-label="Previous" class="page-link previous">
&lsaquo;&lsaquo; {% trans "Previous" %}
</a>
</li>
@xtranophilist
xtranophilist / _pagination.html
Last active Jan 17, 2019
Bootstrap 4 Pagination template for django-pure-pagination
View _pagination.html
{% load i18n %}
{% if is_paginated %}
<nav aria-label="navigation" class="p-3">
<ul class="pagination">
{% if page_obj.has_previous %}
<li class="page-item">
<a href="?{{ page_obj.previous_page_number.querystring }}"
class="page-link previous">&lsaquo;&lsaquo; {% trans "Previous" %}</a>
</li>
{% else %}
@xtranophilist
xtranophilist / natgeo_pic_of_the_day.sh National Geographic Picture-Of-The-Day Wallpaper Script
View natgeo_pic_of_the_day.sh
#!/bin/bash
# Copyright (c) 2011 Josh Schreuder
# http://www.postteenageliving.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@xtranophilist
xtranophilist / pacman-aria2.conf
Created Jul 8, 2015
pacman and aria2 configuration
View pacman-aria2.conf
# good balance between details and readability : https://bbs.archlinux.org/viewtopic.php?pid=1491879#p1491879 #archlinux
# vim /etc/pacman.conf
# XferCommand = echo Downloading %u ... && /usr/bin/aria2c --conf-path=/root/.aria2/pacman-aria2.conf %u
# /root/.aria2/pacman-aria2.conf
connect-timeout=30
max-tries=5
retry-wait=10
@xtranophilist
xtranophilist / demo_centos.md
Last active Dec 30, 2015
DemocracyOS on Centos
View demo_centos.md

This is a manual for installing DemocracyOS app in CentOS.

Setting up the Requirements

  1. MongoDB =========== Installing MongoDB and starting its daemon:
You can’t perform that action at this time.