Skip to content

Instantly share code, notes, and snippets.

View 0re5ama's full-sized avatar
🎼
Making a difference since 1994

Bibek Kumar Shah 0re5ama

🎼
Making a difference since 1994
View GitHub Profile
Server = https://mirror.osbeck.com/archlinux/$repo/os/$arch
Server = http://mirror.pseudoform.org/$repo/os/$arch
Server = http://archlinux.mirrors.benatherton.com/$repo/os/$arch
Server = http://artfiles.org/archlinux.org/$repo/os/$arch
Server = http://mirror.i3d.net/pub/archlinux/$repo/os/$arch
Server = http://archlinux.vi-di.fr/$repo/os/$arch
Server = http://mirror.mia11.us.leaseweb.net/archlinux/$repo/os/$arch
Server = http://mirror.archlinux.ikoula.com/archlinux/$repo/os/$arch
Server = http://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
Server = http://mirrors.cat.net/archlinux/$repo/os/$arch
<style>
.file-upload {
font-size: 12px;
font-weight: normal;
border: 1px solid #ccc;
display: inline-block;
padding: 6px 12px;
cursor: pointer;
border-radius: 4px;
border-width: 1px;
# manage manageable dates
sed s/IWM// iwm | sort -n | awk '{print "IWM" $0}' | sed -r 's/\<([0-9])\>/0\1/g' | sed -r 's/ .+//g' | sed -r 's/[-/.]+/-/g'| sed -n '/-/p' | sed -r 's/"//g' | sed -r 's/\<0[0-9]{2}\>/2&/g' | sed -r 's/([0-9]{2})-([0-9]{2})-([0-9]{4})/\3-\2-\1/g' | sed -rn '/[0-9]{4}-[0-9]{2}-[0-9]{2}/p' | sed -r 's/([0-9]{4})-([0-9]{2})-([0-9]{2})/&\t\1\t\2\t\3/g' | awk '{if ($3 < 2020) print $1 "\t" $2 "\tE"; else print $1 "\t" $2 "\tN" }' | sed -r 's/(.+)-(.+)-(.+N)/\1.\2.\3/g' | sed -r "s/^(.+)\t(.+)\t(\w)$/update COMMON.iwm set Completion_date = '\2', DateType = '\3' where SNO = '\1';/g"
# get unmanageable dates
sed s/IWM// iwm | sort -n | awk '{print "IWM" $0}' | sed -r 's/\<([0-9])\>/0\1/g' | sed -r 's/ .+//g' | sed -r 's/[-/.]+/-/g'| sed -n '/-/p' | sed -r 's/"//g' | sed -r 's/\<0[0-9]{2}\>/2&/g' | sed -r 's/([0-9]{2})-([0-9]{2})-([0-9]{4})/\3-\2-\1/g' | sed -r '/[0-9]{4}-[0-9]{2}-[0-9]{2}/d'
# no date
sed s/IWM// iwm | sort -n | awk '{print "IWM" $0}' | sed -r 's/\<([0-9])\>/0\1/g' | sed
function koAddr (data) {
var self = this;
self.States = ko.observableArray(states);
self.Districts = ko.observableArray([]);
self.Vdcs = ko.observableArray([]);
self.State = ko.observable();
self.Dist = ko.observable();
self.VID = ko.observable();
self.State.subscribe(st => {
self.Districts(dists.filter(x => x.StateId == st));
tri = `75
95 64
17 47 82
18 35 87 10
20 04 82 47 65
19 01 23 75 03 34
88 02 77 73 07 63 67
99 65 04 28 06 16 70 92
41 41 26 56 83 40 80 70 33
41 48 72 33 47 32 37 16 94 29
update DCTB_BFI_FILE_UPLOAD_DET
set FILE_NAME=REPLACE(FILE_NAME, 'E:\DCGF\DCGF\IDS\UploadPremiumCollFile\' , '')
WHERE FILE_NAME LIKE '%:%';
select * from DCTB_BFI_FILE_UPLOAD_DET;
SELECT
O.OBJECT_NAME,
S.SID,
S.SERIAL#,
P.SPID,
S.PROGRAM,
SQ.SQL_FULLTEXT,
S.LOGON_TIME
FROM
V$LOCKED_OBJECT L,
@0re5ama
0re5ama / sql.js
Last active March 11, 2018 03:59
var query = function() {
let self = this;
self.sel = 0;
self.fro = 0;
self.whe = 0;
self.data = [];
self.selection = x => x;
self.select = (x = x => x) => {
if ( self.sel ) {
console.err('asdf');
type Point = (f32, f32);
#[derive(Debug)]
struct Line { // ax + by + c = 0
a: f32,
b: f32,
c: f32,
}
#[derive(Debug)]
@0re5ama
0re5ama / tmux.conf
Created March 1, 2018 04:25 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000