Skip to content

Instantly share code, notes, and snippets.

@jacobtomlinson
jacobtomlinson / .gitignore_global
Created August 18, 2017 10:08
An example global gitignore file
# An example global gitignore file
#
# Place a copy if this at ~/.gitignore_global
# Run `git config --global core.excludesfile ~/.gitignore_global`
# Compiled source #
###################
*.com
*.class
*.dll
@JamesMarino
JamesMarino / TouchBar
Created May 15, 2017 01:53
Disable the TouchBar
#!/bin/bash
function enableTouchBar() {
local presentationModeProperties="<dict><key>app</key><string>fullControlStrip</string><key>appWithControlStrip</key><string>fullControlStrip</string><key>fullControlStrip</key><string>app</string></dict>"
defaults delete com.apple.touchbar.agent PresentationModeGlobal
defaults write com.apple.touchbar.agent PresentationModeFnModes $presentationModeProperties
launchctl load /System/Library/LaunchAgents/com.apple.controlstrip.plist
@leshido
leshido / baseline.css
Created February 22, 2017 13:34
A quick baseline grid overlay using css+svg. Inspired by [Basehold.it](https://basehold.it/).
/**
* A quick baseline grid overlay using css+svg.
* Inspired by [Basehold.it](https://basehold.it/).
* @author leshido
*/
body {
position: relative;
}
@tzmartin
tzmartin / embedded-file-viewer.md
Last active May 1, 2024 14:41
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

local GITHUB_API_PATH = "https://api.github.com"
local GITHUB_API_USER = ""
local GITHUB_API_TOKEN = ""
local GITHUB_REPOS = {
"tdlm/os-x-self-destruct"
}
local rate_limit_percentage
local menu_bar_refresh_time = 60
@PButcher
PButcher / Pure CSS Emoji.markdown
Created February 1, 2016 23:00
Pure CSS Emoji
@felquis
felquis / url-schemes.md
Last active April 15, 2024 06:38
iOS, Android browser apps URL Schemes to handle URL between browsers, and apps..

Assume the user is on a mobile device iOS Safari (Or other browser), but you want a link to open into any other specific mobile browser app like Chrome, Safari, Firefox, Opera, Arc... How do you do that?

Chrome

To open on Chrome

<a href="googlechrome://example.com">try it on Chrome</a>

check out Chrome iOS Docs for more information

@goatandsheep
goatandsheep / Texify-Mathjax.js
Last active March 6, 2023 07:57
[Deprecated] A Tampermonkey / Greasemonkey script that turns LaTeX code on page into mathematical symbols using MathJax
// ==UserScript==
// @name TeXify the World MathJax
// @namespace
// @version 1.0
// @description Enables MathJax to process LaTeX on all websites. Based off SOUP (Stack Overflow Unofficial Patch) and http://www.math.ucla.edu/~robjohn/math/mathjax.html.
// @include *
// @copyright
// ==/UserScript==
/*
var mathjaxVersion = "http://cdn.mathjax.org";
@andrie
andrie / repr options.R
Created September 25, 2015 15:16
Changing plot size in Jupyter IRkernel
library(repr)
# Change plot size to 4 x 3
options(repr.plot.width=4, repr.plot.height=3)
curve(sin(x), from = 0, to=2*pi, n = 100)
# Change plot size to 8 x 3
options(repr.plot.width=8, repr.plot.height=3)
curve(sin(x), from = 0, to=4*pi, n = 200)
@sshay77
sshay77 / gist:4b1f6616a7afabc1ce2a
Created July 18, 2015 15:15
google-search-url-parameters-query-string-
// ==UserScript==
// @name Google Search Better Privacy
// @description Delete unnecessary params and add useful params on Google Search.
// @version 0.0.4
// @include http://*.google.*/search*
// @include http://*.google.*/imgres*
// @include https://*.google.*/search*
// @include https://*.google.*/imgres*
// @exclude http://play.google.com/*
// @exclude http://mail.google.com/*