Skip to content

Instantly share code, notes, and snippets.

@seriallos
seriallos / shrouded-buffs.simc
Last active October 13, 2022 08:49
WoW M+ Shrouded Buff Sim Input
# PASTE IN YOUR /SIMC INPUT AFTER THIS LINE
# Run this in Raidbots Advanced mode: https://www.raidbots.com/simbot/advanced
#
# Or using a recent nightly build of SimC: https://www.simulationcraft.org/download.html
#
# The lines below test out 5, 10, 15, and 20 stacks of each Bounty buff to give a sense of what
# will provide the most DPS.
@nathan-appere
nathan-appere / rspec_deterministic.rb
Created February 6, 2022 10:41
RSpec helper for deterministic specs
require 'factory_bot_rails'
RSpec.configure do |config|
config.before do
Random.srand(config.seed)
Faker::Config.random = Random.new(config.seed)
allow(SecureRandom).to(receive(:uuid).and_wrap_original { |*| Faker::Internet.uuid })
end
@fernandoaleman
fernandoaleman / mysql2-mojave.md
Last active February 7, 2024 19:19
Install mysql2 on MacOS Mojave

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

@bjoern-r
bjoern-r / Huawei_E3372_openwrt.md
Last active July 9, 2024 08:11
How to use a Huawei E3372 on OpenWRT

HOWTO use a Huawei E3372 on OpenWRT

This modem is also sold as a MegaFon M150-2 USB dongle

Needed Software

Install the needed packages via opkg tool

opkg update
// app/redux/action-creators.es6.js
import {SET_ROUTE} from 'app/redux/action-types';
export const setRoute = (route) => {
return {
type: SET_ROUTE,
route
};
};
@yang-wei
yang-wei / destructuring.md
Last active July 4, 2024 16:56
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@meleyal
meleyal / .scss-lint.yml
Created August 13, 2014 16:45
scss-lint `PropertySortOrder` config based on @mdo's Code Guide / recess
# based on http://git.io/hpl2Gw
linters:
PropertySortOrder:
order:
- position
- top
- right
- bottom
- left
@hopsoft
hopsoft / db.rake
Last active July 5, 2024 14:52
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd
# http://darrinholst.com/post/18231749247
desc "tail log files"
task :tail, :roles => :app do
run "tail -f #{shared_path}/log/#{rails_env}.log" do |channel, stream, data|
puts "#{channel[:host]}: #{data}"
break if stream == :err
end
end
#Use Apache as proxy for VM based on local DNS resolution
<VirtualHost *:80>
ServerName vm.example.com
ServerAlias *.vm.example.com
RewriteEngine on
RewriteCond %{HTTP_HOST} (.*)\.vm\.example\.com$
RewriteRule (.*)$ http://%1.vm.example.com/$1 [P]
</VirtualHost>