Skip to content

Instantly share code, notes, and snippets.

View VirenMohindra's full-sized avatar
🤠

Viren Mohindra VirenMohindra

🤠
View GitHub Profile
@plembo
plembo / ghpwithnamecheap.md
Last active April 10, 2024 01:53
GitHub Pages with Namecheap custom domain

Using GitHub Pages with a custom domain: Namecheap Edition

As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.

The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe [1].

Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my experience using the apex domain (https://example.com) instead resulted in fewer complications.

Procedure

So here's my recipe for using a custom domain with GitHub pages where Namecheap is the DNS provider:

@lacostenycoder
lacostenycoder / README.md
Last active November 2, 2023 17:18
Ruby script to toggle night-mode hack on Slack Desktop app - Mac only, maybe linux

- IMPORTANT

For security, since this script injects CSS via AJAX, first fork the main slack night mode repo. The reason is explained here

UPDATE: The code has been modified to download the remote css to a local file and use ruby sass compiler to verify there is no malicious code in the remote css. This will error if the code has been modified to include anything malicious (i.e. script or img tags etc.) It's also been refactored to use the local file inside the js injection, it makes sure it's safe first in the very unlikely event the local file somehow differs from the remote css. The chances of this happening are remote, but this should suffice for safety.

Installation

  • save this script wherever you keep your ruby scripts for example ~/lacostenycoder/scripts/ruby/
  • change the URL in the remote_repo variable in ruby script to use YOUR repo. The rawgit.com file is crea
@belmer
belmer / .eslintrc.js
Last active October 11, 2018 01:57
Eslint config
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"globals": {
"nconf": true
},
"parser": "babel-eslint",
@alexanderankin
alexanderankin / index.diff
Created November 22, 2016 04:51
twitter changes draft
diff --git a/index.html b/index.html
index 6582498..12f71ac 100644
--- a/index.html
+++ b/index.html
@@ -98,6 +98,7 @@ comments: false
<div>
<!-- Tab panes -->
<div class="tab-content">
+ {% increment issue_number %}
{% for tab in site.data.data.tabs %}

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@xv-tom-l
xv-tom-l / uninstall.tool
Created August 25, 2015 08:22
Uninstall script for ExpressVPN Mac 4.x
#!/usr/bin/env bash
#----------------------------------------------------------------------
# Functions
#----------------------------------------------------------------------
# Exits the script with the given exit code after waiting
# for a keypress.
#
# @param [Integer] $1 exit code.
function key_exit() {
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh