Skip to content

Instantly share code, notes, and snippets.

View miketrebilcock's full-sized avatar

Mike Trebilcock miketrebilcock

View GitHub Profile
Hakky54 /
Last active June 13, 2024 14:32 — forked from p3t3r67x0/
Some list of openssl commands for check and verify your keys

OpenSSL 🔐


Install the OpenSSL on Debian based systems

sudo apt-get install openssl
snowyu /
Created September 8, 2018 13:19
Add the typescript supports to quasar framework

Note: This guide applies to the project created by quasar-cli.

First install typescript and ts-loaderpackages in your project.

npm i -D typescript ts-loader

Then modified the quasar.conf.js file in your project:

sararob / data-structure.js
Last active April 26, 2022 22:21
Role-based security in Firebase
This example shows how you can use your data structure as a basis for
your Firebase security rules to implement role-based security. We store
each user by their Twitter uid, and use the following simplistic approach
for user roles:
10 - USER
wafflesnatcha /
Last active March 13, 2018 04:49
Bash: # Shorten a URL using the Google URL Shortener service (
#!/usr/bin/env bash
# Usage: [URL]
# Shorten a URL using the Google URL Shortener service ( {
[[ ! $1 ]] && { echo -e "Usage: [URL]\n\nShorten a URL using the Google URL Shortener service ("; return; }
curl -qsSL -m10 --connect-timeout 10 \
'' \
-H 'Content-Type: application/json' \
-d '{"longUrl":"'${1//\"/\\\"}'"}' |
hinnerk-a / wp_log_http_requests.php
Created May 31, 2012 20:31
WordPress filter hook for logging WP HTTP requests
function wp_log_http_requests( $response, $args, $url ) {
// set your log file location here
$logfile = plugin_dir_path( __FILE__ ) . '/http_requests.log';
// parse request and response body to a hash for human readable log output
$log_response = $response;
if ( isset( $args['body'] ) ) {
joshilewis / MyClass.cs
Created February 5, 2012 14:00
Simple Unit of Work implementation
using System;
namespace ClassLibrary
public interface IDependency
void SomeMethod(string s);
public class MyClass
pklaus /
Last active March 15, 2024 15:32
Python: List all Network Interfaces On Computer
Determine IPv4 addresses on a Linux machine via the socket interface.
Thanks @bubthegreat the changes to make it Py2/3 compatible and the helpful
code comments:
This version has all comments removed for brevity.
import socket
import array
import struct