This file contains hidden or 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 bash | |
wallpapers_dir="$HOME/Pictures/Wallpapers" | |
get_random_file() { | |
find "$1" -type f -print0 | xargs -0 shuf -e -n 1 -z | |
} | |
write_selected_wall() { | |
echo "$1" >"$HOME/.current_wall" |
This file contains hidden or 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/python3 | |
""" | |
author @debendraoli | |
This script is used to automate attendance in hrm.ingnepal.com | |
Usage: | |
python attendance.py |
This file contains hidden or 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 | |
""" | |
@uthor @debendraoli | |
Compitable with waybar. | |
""" | |
import re | |
from json import dumps | |
from urllib.request import Request, urlopen |
This file contains hidden or 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
import React, { Component } from 'react'; | |
import { BrowserRouter as Router, Route, Link } from "react-router-dom"; | |
import { Layout, Menu, Icon } from 'antd'; | |
import Dashboard from './containers/Dashboard/Dashboard'; | |
import Meseros from './containers/Meseros/Meseros'; | |
const { Header, Content, Footer, Sider } = Layout; | |
const SubMenu = Menu.SubMenu; |
This file contains hidden or 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
// @author github.com/debendraoli | |
function getQueryString(querystring) { | |
//check & remove "?" and split each query using "&" | |
const string = (querystring.substr(0, 1) === "?" ? querystring.substr(1) : querystring).split('&'); | |
// generate tuple ["query", "string"] by spliting query: query=string | |
// return the object as key value pairs using built-in object.fromEntries | |
return Object.fromEntries(string.map(string => string.split("="))); | |
} |
This file contains hidden or 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
CREATE TABLE tbl_A(col1 VARCHAR(20) NOT NULL PRIMARY KEY); | |
CREATE TABLE tbl_B( | |
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | |
col1 VARCHAR(20) NOT NULL, | |
col2_id integer NOT NULL, | |
col3_id integer NULL, | |
FOREIGN KEY (col2_id) REFERENCES tbl_A(col1), | |
FOREIGN KEY (col3_id) REFERENCES tbl_C(id) | |
); |
This file contains hidden or 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
@ECHO OFF | |
REM Developed by Debendra, http://github.com/debendraoli | |
SETLOCAL EnableDelayedExpansion | |
net session >nul 2>&1 | |
if %errorLevel% NEQ 0 ( | |
ECHO. | |
ECHO This Command requires administrator privilege | |
ECHO Please open this file as administartor | |
ECHO. |
This file contains hidden or 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
from apiclient.discovery import build | |
from httplib2 import Http | |
from oauth2client import file, client, tools | |
from apiclient.http import MediaFileUpload | |
import os | |
import json | |
import glob | |
import argparse | |
# @author debendraoli (github id) |
This file contains hidden or 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 uniord($u) { | |
// i formated this code from various online resources | |
// Debendra Oli | |
// https://github.com/debendraoli | |
$k = mb_convert_encoding($u, 'UCS-2LE', 'UTF-8'); | |
$k1 = ord(substr($k, 0, 1)); | |
$k2 = ord(substr($k, 1, 1)); | |
return $k2 * 256 + $k1; | |
} |