Skip to content

Instantly share code, notes, and snippets.

View hashhar's full-sized avatar
🐰
Working on Trino

Ashhar Hasan hashhar

🐰
Working on Trino
View GitHub Profile
@hashhar
hashhar / Firefox Config.md
Last active May 10, 2022 23:34
Firefox Config

Firefox Config

These are my various configs for Firefox.

  • Sideberrry custom style
  • TreeStyleTabs custom style
  • userChrome style
@hashhar
hashhar / Firefox Nightly Setup.md
Last active October 6, 2020 14:14
Firefox Nightly Setup

Firefox Nightly Setup on Linux

Download latest Firefox Nightly build from here.

Once downloaded, extract to some location.

cd Downloads
sudo chown -R $USER:$USER /opt
tar -xvf firefox-xxx.tar.bz2 -C /opt
@hashhar
hashhar / Trino Query Examples.md
Last active May 23, 2021 17:26
Sample Python3 example to run SQL queries concurrently

Trino Query Examples

Python

  • Install trino client as pip install trino.
  • Set the env vars TRINO_HOST, TRINO_PORT, TRINO_USER, TRINO_CATALOG and TRINO_SCHEMA.
  • Run as python3 .
@hashhar
hashhar / tab-center-redux.css
Last active November 16, 2022 03:06
Firefox Config
/* Hide the New Tab button */
#newtab {
display: none;
}
/* Remove extra padding and margins from Search tabs field */
#searchbox {
padding: 0px;
margin: -2px;
}
@hashhar
hashhar / example.php
Created August 25, 2017 09:27
Test case for RainbowParentheses.vim
<?php
/**
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@hashhar
hashhar / bar.sh
Last active August 30, 2017 07:05
MPD Status in i3status
#!/bin/bash
i3status | while :
do
read line
printf -v mpd_song "%q" "$(mpc current -f "[[%albumartist%|%artist% - ]%title%]")"
# printf -v sets the variable to '' in case of empty assignment
if [[ "$mpd_song" == "''" ]]; then
printf -v mpd_song "%q" "$(basename "$(mpc current -f "%file%")")"
@hashhar
hashhar / _aurvote
Last active July 4, 2017 15:21
Bash Completion Scripts
# Written: Ashhar Hasan (hashhar_dev at outlook dot com) on 13 April 2017
_cache_file="${XDG_CACHE_HOME:=~/.cache}/aurvote/packages.gz"
# If cache file is older than a week or doesn't exist yet, update it.
_setup_cache()
{
local last_update=1
[ -e "${_cache_file}" ] && last_update=$(stat -c %Y "${_cache_file}")
# Compare the epoch times of existing file and current date.
@hashhar
hashhar / firefly.1611290733
Created April 12, 2017 13:43
Firefly (TV series) fortune cookie file
See also:Serenity (film)
"The Ballad of Serenity" (Theme song) written by Joss Whedon
Mal: We have done the impossible, and that makes us mighty.
-- Firefly (TV series) - None
%
Bendis: We're gonna die.
Mal: We're not gonna die. We can't die, Bendis. You know why? Because we are so... very... pretty. We are just too pretty for God to let us die. Huh? Look at that chiseled jaw!
@hashhar
hashhar / keybase.md
Last active April 11, 2017 23:21
Gist To Verify Keybase

Keybase proof

I hereby claim:

  • I am hashhar on github.
  • I am hashhar (https://keybase.io/hashhar) on keybase.
  • I have a public key whose fingerprint is FD72 66D7 E97C E555 8467 C1D1 9F5D 1C84 0832 AF1E

To claim this, I am signing this object:

Usage: VSIXInstaller.exe [/quiet] [/admin] [/skuName:name /skuVersion:version] </uninstall:vsixID | vsix_path>
- OPTIONS -
/quiet
Suppresses the UI. Short form is '/q'.
/admin
The extension will be installed to the admin extensions location. Short form is '/a'.