Skip to content

Instantly share code, notes, and snippets.

View grenade's full-sized avatar

rob thijssen grenade

View GitHub Profile
@grenade
grenade / install-watchman.sh
Last active June 17, 2020 10:08 — forked from davidmason/install-watchman.bash
To install watchman on Fedora 28, these are all the hoops I had to jump through.
# The following packages are needed during `make`
# - openssl-devel so you don't get:
# ContentHash.cpp:13:10: fatal error: openssl/sha.h: No such file or directory
# - redhat-rpm-config so you don't get:
# gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
# - python-devel so you don't get:
# pywatchman/bser.c:31:10: fatal error: Python.h: No such file or directory
sudo dnf install openssl-devel redhat-rpm-config python-devel libtool
# The rest is just instructions from
@grenade
grenade / impersonate.go
Created February 8, 2016 11:07 — forked from kostix/impersonate.go
A demonstration example for http://stackoverflow.com/a/26124494
// A demonstration example for http://stackoverflow.com/a/26124494
// It runs a goroutine locked to an OS thread on Windows
// then impersonates that thread as another user using its name
// and plaintext password, then reverts to the default security
// context before detaching from its OS thread.
package main
import (
"log"
"runtime"
#! /bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# usage:
# $ SANDBOX="/builds/aws_manager" ENV="bld" PLATFORM="win" ARCH="64" TARGET_HOST="$ENV-2008-ec2-golden" /builds/aws_manager/a0bab1937fbc8f06cfff/register.sh
echo "Attempting IP allocation and DNS mapping"
@grenade
grenade / update_firefox_developer_edition.sh
Last active August 10, 2024 22:29 — forked from simonewebdesign/install_sublime_text.sh
this script is based on another for Sublime Text (http://www.simonewebdesign.it/install-sublime-text-3-on-linux/). It will handle updates (detects the latest developer or nightly edition) and locale (using your $LANG environment variable) (only tested on a 64 bit, fedora system, feedback welcome).
#!/bin/sh
# Firefox Developer Edition install
# No need to download this script, just run it on your terminal:
# $ curl -L git.io/firefoxdev | sh
# When you need to update Firefox Developer Edition, run this script again.
START_CMD="firefox-dev"
INSTALLATION_DIR="/opt/${START_CMD}"
@grenade
grenade / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@grenade
grenade / bootstrap.ps1
Last active January 15, 2020 18:24 — forked from leonsodhi/nxlog_config_template.conf
nxlog eventlog forwarding configuration, broken into GPO friendly chunks
Import-Module GroupPolicy
Copy-GPO -SourceDomain releng.ad.mozilla.com -SourceName DC_Security_Logging -TargetDomain releng.ad.mozilla.com -TargetName install_nxlog
New-Item -ItemType Directory -Path \\releng.ad.mozilla.com\SysVol\releng.ad.mozilla.com\files\nxlog
Copy-Item *.conf \\releng.ad.mozilla.com\SysVol\releng.ad.mozilla.com\files\nxlog
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Framework.Client;
using Microsoft.TeamFoundation.Framework.Common;
using Microsoft.TeamFoundation.Server;
using Microsoft.TeamFoundation.VersionControl.Client;