Skip to content

Instantly share code, notes, and snippets.

View dezren39's full-sized avatar
🕵️‍♂️
Processing..

Drewry Pope dezren39

🕵️‍♂️
Processing..
View GitHub Profile
$Path = $env:TEMP
$Installer = "chrome_installer.exe"
Invoke-WebRequest "https://dl.google.com/chrome/install/latest/chrome_installer.exe" -OutFile $Path$Installer
Start-Process -FilePath $Path$Installer -Args "/silent /install" -Verb RunAs -Wait
Remove-Item $Path$Installer
@jsomers
jsomers / websters-chrome.md
Created November 10, 2014 14:20
Adding Webster's as a Chrome search engine

Instructions courtesy of @chancelionheart:

  1. Access the Settings menu by clicking the Options icon in the upper-right corner of the browser window. It is the icon with three horizontal lines stacked on top of each other. Click on “Settings” near the bottom of the Options menu.

  2. Under the “Search” heading in the Settings menu, click the "Manage search engines" button.

  3. At the bottom of the Search Engines window that comes up, enter the following: Name: Use whatever you like (I used "Webster's Revised 1913+1928 Dictionary") Keyword: Also whatever you like, I just use 'd' for easy access. Url: http://machaut.uchicago.edu/?resource=Webster%27s&word=%s&use1913=on&use1828=on (replaces the search term with %s, what google chrome uses for the query)

@domenic
domenic / interop.md
Last active July 7, 2022 19:47
`module.exports =` and ES6 Module Interop in Node.js

module.exports = and ES6 Module Interop in Node.js

The question: how can we use ES6 modules in Node.js, where modules-as-functions is very common? That is, given a future in which V8 supports ES6 modules:

  • How can authors of function-modules convert to ES6 export syntax, without breaking consumers that do require("function-module")()?
  • How can consumers of function-modules use ES6 import syntax, while not demanding that the module author rewrites his code to ES6 export?

@wycats showed me a solution. It involves hooking into the loader API to do some rewriting, and using a distinguished name for the single export.

This is me eating crow for lots of false statements I've made all over Twitter today. Here it goes.

@niraj-shah
niraj-shah / replicate_db.sh
Last active July 7, 2022 20:39
Script to Replicate Database from Remote to Local
#!/bin/bash
# replicate_db.sh (c) by Niraj Shah
# replicate_db.sh is licensed under a
# Creative Commons Attribution-ShareAlike 4.0 International License.
# You should have received a copy of the license along with this
# work. If not, see <http://creativecommons.org/licenses/by-sa/4.0/>.
# https://www.webniraj.com/2017/01/13/replicating-a-remote-mysql-database-to-local-environment-server/
@wassname
wassname / 1.generate_dockerignore.py
Last active July 21, 2022 13:50
Convert .gitignore to .dockerignore: quick and dirty.
"""
Convert .gitignore to .dockerignore: quick and dirty.
This is a quick and dirty script to convert this:
`__pycache__/`
Into this:
```
__pycache__
*/__pycache__
@mbillow
mbillow / consul-firewalld.md
Last active August 11, 2022 21:57
Consul FirewallD Service Definition

Consul FirewallD Service Definition

A simple service definition for Consul agents; meant to simplify the installation process of Consul.

This is based on the information provided by Hashicorp in the Consul Docs.

Installation

  1. Download the XML file:
  • Either wget {raw_url} consul.xml
@dezren39
dezren39 / consul-firewalld.md
Created August 11, 2022 21:57 — forked from mbillow/consul-firewalld.md
Consul FirewallD Service Definition

Consul FirewallD Service Definition

A simple service definition for Consul agents; meant to simplify the installation process of Consul.

This is based on the information provided by Hashicorp in the Consul Docs.

Installation

  1. Download the XML file:
  • Either wget {raw_url} consul.xml
@zuazo
zuazo / hb_all_books_dl.js
Last active September 10, 2022 14:36 — forked from p0kR/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
/*
Forked from https://gist.github.com/p0kR/95e05e689be4e59b1b8fb6e383b9e25a
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
this fork downloads all formats and does so without using jquery (since that didnt work for me)
note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this
Settings (chrome://settings) --> Advanced --> Privacy and security --> Content settings --> PDF documents --> Download PDF files instead of automatically opening them in Chrome --> Turn ON
@WeebDataHoarder
WeebDataHoarder / Z_dpdk_fm10k.example.conf
Last active September 12, 2022 01:42
Sets up DPDK + Silicom FM10K patches and Open vSwitch withd DPDK support, with inline Switch Managers that supports, between others, Silicom PE3100G2DQiRM-QX4 cards.
# Tell how many PF ports are bound in DPDK.
# Driver will check the number when initializes.
dpdk.bind.pf.number int 4
# Set external port speed, 40 means 40G, 100 means 100G.
extern.port.speed int 40
@ebramanti
ebramanti / uncle_bob_scribe_oath.md
Last active December 20, 2022 14:54
Uncle Bob Scribe's Oath

Uncle Bob - Scribe's Oath

  1. I will not produce harmful code.
    • I will not intentionally write code with bugs.
    • This means: Do your best.
  2. I will not produce code that's not my best.
  3. I will provide with each release a quick, testable & repeatable proof that the code works.
  4. I will not avoid release that will impede progress.
    • Short term rapid releases
  5. I will fearlessly and relentlessly improve the quality of code.
  • I will never make the code worse.