Skip to content

Instantly share code, notes, and snippets.

@zxhfighter
zxhfighter / emmet-snippet.md
Last active January 8, 2019 07:27
自定义emmet模板

自定义emmet模板

问题复现

ST(Sublime Text)安装emmet插件后,输入!,按tab键就可以快速得到一个简易的html5模板,甚是便捷:

<!DOCTYPE html>
<html lang="en">
<head>
@PButcher
PButcher / Pure CSS Emoji.markdown
Created February 1, 2016 23:00
Pure CSS Emoji
@sicarul
sicarul / distracted_bf.Rmd
Last active April 23, 2020 15:38
Distracted BF
``` r
library(tidyverse)
dbf = data.frame(color=character(0), x=numeric(0), y=numeric(0), stringsAsFactors = F)
## Distractive woman
# Left arm
dbf = bind_rows(dbf, crossing(color='skin', x=seq(4,5), y=seq(1,9)))
dbf = bind_rows(dbf, data.frame(color='skin', x=5, y=10))
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
@rvlasveld
rvlasveld / quit-open.applescript
Last active August 12, 2021 17:27
Cocoa-AppleScript to open and close applications when an other launches or terminates. See http://rvlasveld.github.io/blog/2013/04/21/open-and-close-applications-when-an-other-launches-or-terminates/ for more information.
-- main.scpt
-- Cocoa-AppleScript Applet
--
-- This app can close and open applications when an other application,
-- the trigger, is launced or terminated. This can be useful when two
-- applications interfere with eachother or when one is dependend on the
-- other (e.g. with setting an VPN connection).
--
--
-- Roemer Vlasveld (roemer.vlasveld@gmail.com)
@somebox
somebox / osx-setup.sh
Last active December 11, 2021 13:05 — forked from foz/osx-setup.sh.md
Set up an OSX machine from zero to awesome. Uses Homebrew (and cask, fonts, etc). Focused on Ruby/Rails development, includes rvm, xquartz, editor fonts, sublime text, and many tools.
#!/bin/bash
# A script to set up a new mac. Uses bash, homebrew, etc.
# Focused for ruby/rails development. Includes many utilities and apps:
# - homebrew, rvm, node
# - quicklook plugins, terminal fonts
# - browsers: chrome, firefox
# - dev: iterm2, sublime text, postgres, chrome devtools, etc.
# - team: slack, dropbox, google drive, skype, etc
@jennybc
jennybc / yaml_frontmatter_r_github_document.yaml
Last active February 9, 2022 21:36
YAML frontmatter for R Markdown to cause rmarkdown::render() to retain intermediate Markdown file for .R and .Rmd files, respectively
#' ---
#' title: "Something fascinating"
#' author: "Jenny Bryan"
#' date: "`r format(Sys.Date())`"
#' output: github_document
#' ---
@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)
@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;
}
@lehnerpat
lehnerpat / gh-compare.md
Last active September 3, 2022 04:33
GitHub Compare view

GitHub's compare view is available at:

https://github.com/$USER/$REPO/compare/$REV_A...$REV_B

Naturally, $USER and $REPO are the owner (user/organization) and repository names, respectively.

$REV{A,B} are the two sides of the compare view; they can either be a ref in $USER's repository, i.e. the name of a branch, tag or a commit SHA, or it can be a ref in $OWNER's fork of the repository by using the format $OWNER:$REF.

You can get a diff or patch for the result of the compare view by appending .diff or .patch to the URL, respectively.