Skip to content

Instantly share code, notes, and snippets.

View tmandry's full-sized avatar

Tyler Mandry tmandry

View GitHub Profile
@ldez
ldez / gmail-github-filters.md
Last active April 3, 2024 11:53
Gmail and GitHub - Filters

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label
@jart
jart / blakefiler.py
Last active September 18, 2023 16:22
Turns bazel query --output=build //tensorflow:libtensorflow_framework.so into isomorphic Makefile
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@knutwalker
knutwalker / README.md
Last active April 19, 2023 16:17
Git commit graph to Neo4j

Installation

  • requires python 2.7 (maybe python 3.3+ will work too, didn't tested it)

Put git2neo.py somewhere in your $PATH and chmod +x it.

Usage

@puffnfresh
puffnfresh / CGSSpaces.h
Last active February 20, 2023 17:57
Header for undocumented Spaces APIs
#include <Carbon/Carbon.h>
typedef void *CGSConnectionID;
extern CGSConnectionID _CGSDefaultConnection(void);
#define CGSDefaultConnection _CGSDefaultConnection()
typedef uint64_t CGSSpace;
typedef enum _CGSSpaceType {
kCGSSpaceUser,
kCGSSpaceFullscreen,

ruby-1.9.3-p484 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p484 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@rjw57
rjw57 / CGSPrivate.h
Last active December 2, 2022 06:36
CGSPrivate.h - undocumented APIs for OSX. Re-licensed under MIT licence.
/* CGSPrivate.h -- Header file for undocumented CoreGraphics stuff. */
/* This file is a relicensed portion of DesktopManager and was originally released under
* the terms of the GNU General Public Licence. Original licence text follows the new terms.
* The contents of this file has been re-released by the original author under the following terms:
*
* Copyright (C) 2003, 2004, 2013 Richard J Wareham <richwareham@users.sourceforge.net>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
@calebd
calebd / ArrayHelpers.swift
Last active November 4, 2022 15:17
Swift Helpers
extension Array {
func first() -> Element? {
if isEmpty {
return nil
}
return self[0]
}
func last() -> Element? {
@rajarsheem
rajarsheem / newton optimization.py
Created June 6, 2016 22:19
Newton's optimization method for multivariate function in tensorflow
import numpy as np
import tensorflow as tf
# Newton's optimization method for multivariate function in tensorflow
def cons(x):
return tf.constant(x, dtype=tf.float32)
def compute_hessian(fn, vars):
mat = []
@dreadatour
dreadatour / gist:7475747
Created November 14, 2013 22:51
Remove default Sublime Text 3 snippets
# Sublime Text 3 languages list:
ls -1 /Applications/Sublime\ Text.app/Contents/MacOS/Packages/
# Remove all default Sublime Text 3 snippets for Python language
export ST3_LANG="Python"
mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/
unzip -l /Applications/Sublime\ Text.app/Contents/MacOS/Packages/$ST3_LANG.sublime-package | grep '.sublime-snippet' | awk '{print $4}' | while read f; do touch ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/$f; done
unset ST3_LANG
@mikegehard
mikegehard / Setting longer HTTP timeout in capybara
Created April 15, 2011 19:20
Setting longer HTTP timeout in capybara
# We need this to fix the random timeout error that we were seeing in CI.
# May be related to: http://code.google.com/p/selenium/issues/detail?id=1439
Capybara.register_driver :selenium_with_long_timeout do |app|
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120
Capybara::Driver::Selenium.new(app, :browser => :firefox, :http_client => client)
end
Capybara.javascript_driver = :selenium_with_long_timeout