Skip to content

Instantly share code, notes, and snippets.

View mike623's full-sized avatar

404 Not Found mike623

View GitHub Profile
@yvesh
yvesh / pxe-101.conf
Created December 19, 2019 11:41
Proxmox QEMU KVM Windows 10 Configuration with GPU PCI-Passthrough and looking-glass support. Binds non-tls spice port to 5930
agent: 1
args: -device ivshmem-plain,memdev=ivshmem,bus=pcie.0 -object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M -device virtio-mouse-pci -device virtio-keyboard-pci -spice addr=0.0.0.0,port=5930,disable-ticketing
audio0: device=AC97,driver=spice
bios: ovmf
bootdisk: sata0
cores: 16
cpu: host,flags=+ibpb;+virt-ssbd
hostpci0: 42:00,pcie=1,x-vga=1
ide2: none,media=cdrom
machine: q35
@maxme
maxme / raspberry-power-supply-check.sh
Last active August 5, 2023 06:45
Check your Raspberry pi power supply and USB cable
#!/bin/bash
# Before running this script, make sure you have sysbench installed:
# sudo apt-get install sysbench
#
# This script helps you check if your Raspberry pi is correctly powered.
# You can read more about Raspberry pi powering issues here: https://ownyourbits.com/2019/02/02/whats-wrong-with-the-raspberry-pi/
# If you're pi is correctly powered (stable power supply and quality cable), after running the script, you should get something like:
@vktr
vktr / rule.js
Created February 10, 2018 18:54
Add Stripe Customer Id to Auth0 via custom rule
function (user, context, callback) {
user.app_metadata = user.app_metadata || {};
if ('stripe_customer_id' in user.app_metadata) {
context.idToken['https://example.com/stripe_customer_id'] = user.app_metadata.stripe_customer_id;
return callback(null, user, context);
}
var stripe = require('stripe')('sk_....');
var customer = {
@keith
keith / testflight.sh
Last active November 1, 2023 12:59
Upload an ipa to testflight using altool
#!/bin/bash
set -euo pipefail
xcrun altool --upload-app --type ios --file "path/to/foo.ipa" --username "$ITC_USER" --password "$ITC_PASSWORD"
@jonsuh
jonsuh / flexbox.css
Last active May 2, 2024 19:01
Flexbox utility classes
/* Flexbox
// ================================================== */
.d--f { display: flex; }
.d--if { display: inline-flex; }
/* Flex direction */
.fd--r { flex-direction: row; } /* Default */
.fd--rr { flex-direction: row-reverse; }
.fd--c { flex-direction: column; }
.fd--cr { flex-direction: column-reverse; }
@matthewberryman
matthewberryman / 01-http_basic_auth.config
Created February 13, 2017 11:10
config file for adding basic auth to an elastic beanstalk nginx config
files:
/etc/nginx/.htpasswd:
mode: "000644"
owner: root
group: root
content: |
username:passwd_hash
# use httpasswd -c -b password_file desired_username desired_password
# and copy and paste the line from that in to username:password_hash
@marc-rutkowski
marc-rutkowski / README.md
Last active June 17, 2021 13:17
react-storybook with react-boilerplate (content of the .storybook/ directory)

react-storybook with react-boilerplate

Explains how to install and configure react-storybook into a project created from the react-boilerplate setup.

Intro

React-boilerplate (rbp) is a good starting point to create React apps, with a focus on performance, best practices and DX.

The community around the repository is amazing and a constant source of learning.

<template name="ForgotPassword">
<form action="/forgot" id="forgotPasswordForm" method="post">
<input id="forgotPasswordEmail" type="text" name="email" placeholder="Email Address">
<input class="btn-submit" type="submit" value="Send">
</form>
<!-- end #forgot-password-form -->
</template>
@iDoMeteor
iDoMeteor / meteor-get-real-ip
Created July 3, 2015 11:35
Gets the DDP connections true IP address by analyzing HTTP forwarded count from the Meteor.connection object. Stripped from iDM Connection Log.
Meteor.methods({
// Get the connections *real* IP
getConnectionIP: function () {
// No need to make others wait
this.unblock();
// Locals
var conn = this.connection;
@longliangyou
longliangyou / iron-router.js
Last active January 12, 2020 06:52
Meteor
// meteor add iron:router
// https://github.com/EventedMind/iron-router/blob/devel/Guide.md#route-options
Router.route('/post/:_id', {
// The name of the route.
// Used to reference the route in path helpers and to find a default template
// for the route if none is provided in the "template" option. If no name is
// provided, the router guesses a name based on the path '/post/:_id'
name: 'post.show',