Skip to content

Instantly share code, notes, and snippets.

<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
C:\git\main >pip install -U git+https://github.com/mhils/clint.git
Downloading/unpacking git+https://github.com/mhils/clint.git
Cloning https://github.com/mhils/clint.git to c:\users\dfabulich\appdata\local\temp\pip-yc40fw-build
Running setup.py egg_info for package from git+https://github.com/mhils/clint.git
Requirement already up-to-date: args in c:\python27\lib\site-packages (from clint==0.3.0)
Installing collected packages: clint
Running setup.py install for clint
warning: install_data: setup script did not provide a directory for 'README.rst' -- installing right in 'c:\Python27'
@dfabulich
dfabulich / mhils clint legit
Created February 8, 2013 21:04
Installing mhils/legit@windows auto-installs the wrong clint?
C:\git\main >pip install -U git+https://github.com/mhils/clint.git
Downloading/unpacking git+https://github.com/mhils/clint.git
Cloning https://github.com/mhils/clint.git to c:\users\dfabulich\appdata\local\temp\pip-yc40fw-build
Running setup.py egg_info for package from git+https://github.com/mhils/clint.git
Requirement already up-to-date: args in c:\python27\lib\site-packages (from clint==0.3.0)
Installing collected packages: clint
Running setup.py install for clint
warning: install_data: setup script did not provide a directory for 'README.rst' -- installing right in 'c:\Python27'
  1. Save greenwtf.ps1 (included in the gist below) to a directory of your choosing.

  2. Copy steam_api.dll to that directory, from the Steamworks SDK 1.34 (that exact version)

  3. Create a steam_appid.txt file in that directory, containing an app ID that you own.

  4. Launch Steam, logged in as your developer account.

  5. Run the script like this:

@dfabulich
dfabulich / Vagrantfile
Last active June 1, 2016 23:04
Vagrantfile to reproduce Centos 7 without sandbox
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.vm.provision "shell", run: "always", inline: <<-SHELL
set -x
sudo yum -y -q install wget java-1.8.0-openjdk-devel
sudo yum -y -q group install "Development Tools"
wget -q https://github.com/bazelbuild/bazel/releases/download/0.2.3/bazel-0.2.3-installer-linux-x86_64.sh
chmod +x bazel-0.2.3-installer-linux-x86_64.sh
sudo ./bazel-0.2.3-installer-linux-x86_64.sh
export PATH=$PATH:/usr/local/bin
@dfabulich
dfabulich / fiddle.response.json
Last active May 8, 2017 21:17
Example of JSON Hijacking
[{'friend':'luke','email':'+ACcAfQBdADsAYQBsAGUAcgB0ACgAJwBNAGEAeQAgAHQAaABlACAAZgBvAHIAYwBlACAAYgBlACAAdwBpAHQAaAAgAHkAbwB1ACcAKQA7AFsAewAnAGoAbwBiACcAOgAnAGQAbwBuAGU-'}]
#!/bin/sh -x
rm -rf sample
git init sample
cd sample
echo hello > testfile
git add testfile
git commit -m 'added testfile'
git branch other
echo goodbye > testfile
git commit -am 'modified testfile'
#!/bin/bash -e
rm -rf example
git init example
cd example
cat > file.txt << EOF
0
0
0
0
0
@dfabulich
dfabulich / starsort.js
Last active September 25, 2023 02:45
Evan Miller Ranking Items with Star Ratings, in JavaScript
"use strict";
// based on unutbu's stackoverflow answer
// https://stackoverflow.com/a/40958702/54829
// which is based on Evan Miller's blog post
// http://www.evanmiller.org/ranking-items-with-star-ratings.html
function starsort(ratings) {
function sum(array) { return array.reduce((x, y) => x + y, 0) };
Computer Information:
Manufacturer: Valve
Model: Jupiter
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Custom APU 0405
CPU Family: 0x17