Skip to content

Instantly share code, notes, and snippets.

View abdul's full-sized avatar
🎯
Focusing

Abdul Qabiz abdul

🎯
Focusing
View GitHub Profile
@abdul
abdul / WireGuard-site-to-site.md
Created April 1, 2020 21:38
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@abdul
abdul / find_and_move_duplicates.sh
Created April 20, 2020 13:46
Find duplicate files -- uses imohash for faster hashing and finding duplicates
#!/bin/bash
# Filename: find_and_move_duplicates.sh
# Description: Find and (re)move duplicate files and
# keep one sample of each file.
gls -lS --time-style=long-iso | awk 'BEGIN {
getline; getline;
name1=$8; size=$5
}
{
name2=$8;

Hello Aleksey,

We’d like to provide open source modular theming examples accessible on GitHub sometime in the future, but hopefully this will answer your question in the short term.

1. The Handlebars Partials File

The contents of the community-posts module’s partials.js file are as follows:

const communityPostsListItem = `
@abdul
abdul / WP to Jekyll Migration Notes
Created May 12, 2020 00:55 — forked from kerim/WP to Jekyll Migration Notes
Notes on migrating Wordpress Blog to GitHub Project Pages using Jekyll and the Hyde theme
I recently migrated ( http://keywords.oxus.net/ ) from my own server to GitHub project pages using Jekyll and the Hyde theme ( https://github.com/poole/hyde ). This Gist documents some of the issues I faced and how I solved the problems.
1. I tried to follow the instructions found on these sites:
http://blog.8thcolor.com/en/2014/05/migrate-from-wordpress/
http://blog.codeinside.eu/2014/09/13/How-We-Moved-From-Wordpress-To-Jekyll-On-Windows/
http://www.nooku.org/blog/2013/03/from-wordpress-to-jekyll/
http://chadfield.org/work/how-i-migrated-wordpress-to-jekyll/
http://www.girliemac.com/blog/2013/12/27/wordpress-to-jekyll/
http://virtuallyhyper.com/2014/05/migrate-from-wordpress-to-jekyll/
@abdul
abdul / disqus-ondemand.html
Created May 12, 2020 07:18 — forked from robwent/disqus-ondemand.html
Loads Disqus comments on click with native JavaScript. Opens comments when linked to directly.
<div class="comments-block">
<button id="show-comments" onclick="disqus();return false;">Load Comments</button>
</div>
<div id="disqus_thread"></div>
<script>
var disqus_loaded = false;
var disqus_shortname = 'xxxx'; //Add your shortname here
@abdul
abdul / install-quake3.sh
Created May 16, 2020 08:40 — forked from simonewebdesign/install-quake3.sh
Install Quake 3: Arena on a mac
#!/bin/bash
# Install Quake 3: Arena on a mac
# Copyright (c) 2016 simonewebdesign
# 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:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
Rank Type Prefix/Suffix
1. Prefix my+
2. Suffix +online
3. Prefix the+
4. Suffix +web
5. Suffix +media
6. Prefix web+
7. Suffix +world
8. Suffix +net
9. Prefix go+
@abdul
abdul / README.md
Created May 26, 2020 19:28 — forked from harshavardhana/README.md
REX-Ray with Minio

Getting Started

The following command will install the latest version of REX-Ray to /usr/bin/rexray on Linux systems:

$ sudo apt install s3fs
$ curl -sSL https://dl.bintray.com/emccode/rexray/install | sh

Depending on the Linux distribution REX-Ray will be registered as either a SystemD or SystemV service.

Configure

REX-Ray requires a configuration file for storing details used to communicate with storage providers. This can include authentication credentials and driver specific configuration options. After REX-Ray has been installed, copy and paste the contents below to a new file on the host at /etc/rexray/config.yml to configure s3fs storage driver.

Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@abdul
abdul / fix-symlinks.sh
Created May 28, 2020 15:01
Convert absolute to relative symlinks -- recursively in a directory