Skip to content

Instantly share code, notes, and snippets.

@bakkdoor
bakkdoor / thrift-mode.el
Created January 8, 2011 02:56
Simple thrift mode (taken from https://github.com/kragen/stevej-emacs/blob/master/thrift-mode/thrift.el) and adjusted to highlight self-defined types, unions & namespaces nicely.
(require 'font-lock)
(defvar thrift-mode-hook nil)
(add-to-list 'auto-mode-alist '("\\.thrift\\'" . thrift-mode))
(defvar thrift-indent-level 2
"Defines 2 spaces for thrift indentation.")
;; syntax coloring
@makestory
makestory / gist:1039648
Created June 22, 2011 07:40
vim function for create xml/html tag.
# useage:
#copy code to your .vimrc
#when you edit text in line > I`m a title
#command :H h1
#<h1>I`m a title</h1>
function! HtmlTag(tag)
normal $
execute "normal! a</".a:tag.'>'
normal ^
@paulmillr
paulmillr / active.md
Last active April 24, 2025 10:07
Most active GitHub users (by contributions). https://paulmillr.com

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
@schmurfy
schmurfy / gist:3199254
Created July 29, 2012 14:33
Install pandoc Mac OS X 10.8
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg
$ sudo chown -R `whoami` /usr/local/texlive
$ tlmgr update --self
$ tlmgr install ucs
$ tlmgr install etoolbox
# Install pandoc view homebrew
@clvrobj
clvrobj / .emacs
Created October 11, 2012 06:49
.emacs
(cond
((= 23 emacs-major-version)
(if (file-exists-p "~/.emacs.d/emacs23.el")
(load-file "~/.emacs.d/emacs23.el")))
((= 24 emacs-major-version)
(if (file-exists-p "~/.emacs.d/emacs24.el")
(load-file "~/.emacs.d/emacs24.el")))
)
@liluo
liluo / gist:4015981
Created November 5, 2012 08:17
去除豆瓣导航黑条背景
var navBgc = $($('.nav-wrap')[0].parentNode).css('background-color');
$('#db-global-nav').css('background', navBgc);
$('#db-global-nav ul li a').css('color', '#566D5E');
$('#db-global-nav ul li.on a').css({'color': '#219A44', 'font-weight': 800});
$('#db-global-nav .bd').css({'width': 960, 'margin': 'auto'});
@flaneur2020
flaneur2020 / sucksversion.md
Last active October 13, 2015 05:37
SucksVersioN

SucksVersioN

svn提供了比git更为精细的权限控制,按照目录为单位。

  • checkout: svn co http://svn.miaomiao.com/svn/trunk -r HEAD
  • 创建自己的分支目录:svn mkdir http://svn.foo.com/svn/branches/fleuria
  • 创建特性分支:svn cp http://svn.foo.com/svn/trunk http://svn.foo.com/svn/branches/fleuria/issue1
  • 切换分支:svn switch http://svn.foo.com/svn/branches/fleuria/issue1
  • 不像git有暂存区,svn在提交时只能将需要提交的文件列在命令里: svn commit -m 'commit message' file1.c file2.c
  • 撤销当前的所有更改: svn revert -R .
@Daniel15
Daniel15 / dialog.js
Created January 8, 2014 18:17
Bootstrap dialog in React
var Dialog = React.createClass({
getInitialState: function() {
return {
className: 'modal fade'
};
},
show: function() {
this.setState({ className: 'modal fade show' });
setTimeout(function() {
this.setState({ className: 'modal fade show in' });
@sergejmueller
sergejmueller / nginx.conf
Created July 11, 2014 09:15
Access-Control-Allow-Origin CORS configuration on Nginx
location ~* \.(eot|ttf|woff|woff2)$ {
add_header Access-Control-Allow-Origin *;
}
@ghostwords
ghostwords / .eslintrc
Last active February 13, 2024 07:35 — forked from cletusw/.eslintrc
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"arrowFunctions": false, // enable arrow functions
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"classes": false, // enable classes
"defaultParams": false, // enable default function parameters
"destructuring": false, // enable destructuring