Skip to content

Instantly share code, notes, and snippets.

View entrptaher's full-sized avatar
🎯
Focusing

Md. Abu Taher entrptaher

🎯
Focusing
View GitHub Profile
// ==UserScript==
// @name Facebook Blue Badge Remover
// @namespace http://taher.xyz/
// @version 0.1
// @description try to take over the world!
// @author @entrptaher
// @match https://www.facebook.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=facebook.com
// @grant none
// ==/UserScript==

How to commit as your username when working remotely on a server

WAY 1: RemoteCommand

CLIENT: set the RemoteCommand in ~/.ssh/config

Host AwesomeServer
  HostName host.example.com
 User ubuntu
@entrptaher
entrptaher / Vagrantfile
Created May 6, 2023 16:11 — forked from markuskont/Vagrantfile
Set up basic cuda/tensorflow/gpuR env with vagrant-libvirt and vfio pci-passthrough
# -*- mode: ruby -*-
# vi: set ft=ruby :
LIBVIRT_POOL = 'fast'
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu1604"
config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_udp: false
#config.vm.synced_folder "../../datastore/spindle/ML/datasets/", "/mnt", type: "nfs", nfs_udp: false
config.vm.network "private_network", :dev => "br0", :mode => 'bridge', :ip => "192.168.17.25"
@entrptaher
entrptaher / until.js
Created November 21, 2022 15:28 — forked from sscovil/until.js
A simple utility for Node.js to wait until a predicate function returns truthy before moving on; for use with ES6 async/await syntax.
/**
* Utility that waits for @predicate function to return truthy, testing at @interval until @timeout is reached.
*
* Example: await until(() => spy.called);
*
* @param {Function} predicate
* @param {Number} interval
* @param {Number} timeout
*
* @return {Promise}
@entrptaher
entrptaher / changetheme.sh
Created September 27, 2022 05:14 — forked from GuillaumeDesforges/changetheme.sh
Bash one liner to set Zsh theme with oh-my-zsh default setup
# Just change the first THEME variable to whatever theme you want. The line will edit, reload and print you the changed line in the .zshrc file
THEME="agnoster"; sed -i s/^ZSH_THEME=".\+"$/ZSH_THEME=\"$THEME\"/g ~/.zshrc && source ~/.zshrc && echo "Edited line in ~/zshrc :" && cat ~/.zshrc | grep -m 1 ZSH_THEME
@entrptaher
entrptaher / syncrc.sh
Created September 18, 2022 00:29
Sync your .files to OneDrive or other cloud storage.
#!/bin/bash
onedrive=`dirname $0`
zsh_dir=.oh-my-zsh #you may need modify this line
readonly onedrive
readonly zsh_dir
upload_ssh() {
od_ssh=$onedrive/.ssh
{
"input": {
"icon": "i-cursor",
"badges": {
"selector": true,
"execute": true
},
"type": "input",
"data": {
"count": 0,
@entrptaher
entrptaher / capital-permutations.js
Last active May 12, 2020 14:14
Programming tasks
/*
Given the input is a string
Print out all permutations and permutations of their capitalizations, in an array
All elements of the output array should contain all letters from the input
*/
function capitalPermutations(input){}
capitalPermutations("a") // => ["a", "A"]
capitalPermutations("ab") // => ["ab", "Ab", "aB", "ba", "Ba", "bA"]
<style>
@font-face{
font-family:SutonnyMJ;
src: url(/data/uploads/sutonnymj.ttf) format('truetype');
}
</style>
<textarea style="font-family:SutonnyMJ;"></textarea>
@entrptaher
entrptaher / install.sh
Created March 4, 2020 05:58 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"