Skip to content

Instantly share code, notes, and snippets.

View isDipesh's full-sized avatar

Dipesh Acharya isDipesh

View GitHub Profile
@isDipesh
isDipesh / pass.ods
Last active April 22, 2024 08:45
LibreOffice Calc random password generator
=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))
@isDipesh
isDipesh / saleor_wysiwyg_trumbowyg.md
Last active October 25, 2017 07:27
Saleor: Adding WYSIWYG to Product Description form in Dashboard

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';
@isDipesh
isDipesh / 1-uptime
Created October 12, 2017 15:39
Useful motd
#!/bin/sh
echo
exec /usr/bin/uptime
@isDipesh
isDipesh / dj_pagination_bootstrap4.html
Created April 13, 2017 09:49
Bootstrap 4 pagination template (partial) for dj-pagination
{% 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>
@isDipesh
isDipesh / _pagination.html
Last active January 17, 2019 10:03
Bootstrap 4 Pagination template for django-pure-pagination
{% 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 %}
@isDipesh
isDipesh / natgeo_pic_of_the_day.sh
Last active November 5, 2015 04:03 — forked from fabianmaass/National Geographic Picture-Of-The-Day Wallpaper Script
National Geographic Picture-Of-The-Day Wallpaper Script
#!/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:
@isDipesh
isDipesh / pacman-aria2.conf
Created July 8, 2015 13:16
pacman and aria2 configuration
# 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
@isDipesh
isDipesh / demo_centos.md
Last active December 30, 2015 20:33
DemocracyOS on Centos

This is a manual for installing DemocracyOS app in CentOS.

Setting up the Requirements

  1. MongoDB =========== Installing MongoDB and starting its daemon:
@isDipesh
isDipesh / pre-commit.py
Last active August 29, 2015 14:06 — forked from ptone/gist:4102528
Git pre-commit hook for Python
#!/usr/bin/env python
import glob
import os
import sys
# git usurbs your bin path for hooks and will always run system python
site_packages = glob.glob('%s/lib/*/site-packages' % os.environ['VIRTUAL_ENV'])[0]
sys.path.insert(0, site_packages)
@isDipesh
isDipesh / Q1.md
Last active June 15, 2023 04:34
Quotes about FOSS, Programming, Software Design and Technology.

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

  • John Woods (Most probably)