Skip to content

Instantly share code, notes, and snippets.

@crazycode
crazycode / RULE.md
Last active November 14, 2023 08:25
安装Gerrit2以及使用说明

代码提交要求

  • 一个Commit对应一个修改点(除非是在项目初始阶段或是升级BSP时)。
  • 不要随便修改文件的属性。Windows 修改过的文件属性会变成755,上传代码时请注意修改成文件的原属性,可以用git whatchanged 来查看自己commit修改的文件。 缩进格式跟原文件保持一致。
  • 不要修改跟提交内容无关的代码。

Git commit 注释要求

  • 设置GIT使用vim来编辑commit,请不要使用-m参数 (git config –global core.editor vim)。
@ngpestelos
ngpestelos / remove-docker-containers.md
Last active March 5, 2024 20:45
How to remove unused Docker containers and images

May 8, 2018

I wrote this four years ago, so instead use this command:

$ docker rmi $(docker images -q -f dangling=true)
301 https://github.com/zxdrive/imouto.host
@wangwen1220
wangwen1220 / js-toggledisabled-input.js
Last active December 14, 2016 08:35
JS: jQuery 切换启用和禁用 | toggle disabled input
// jQuery 切换启用和禁用表单项
(function ($) {
$.fn.toggleDisabled = function() {
return this.each(function() {
var $this = $(this);
if ($this.attr('disabled')) $this.removeAttr('disabled');
else $this.attr('disabled', 'disabled');
});
};
})(jQuery);
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using Caliburn.Micro;
using Autofac;
using IContainer = Autofac.IContainer;
namespace Caliburn.Micro.Autofac {
@simonproctor
simonproctor / Application
Created July 21, 2013 07:33
Delegate factory example for Autofac. Shows an ordinary factory and a factory returning owned instances.
namespace Demo
{
public class Application
{
private readonly IContainer container;
public Application()
{
ContainerBuilder builder = new ContainerBuilder();
builder.RegisterType<Biscuit>().As<IDependency>().Named<IDependency>("biscuits");
@messense
messense / proxy.pac
Last active December 17, 2015 09:39
pac file
/**
* GenPAC 0.2.1 http://jeeker.net/projects/genpac/
* Generated: Fri, 17 May 2013 14:15:55 GMT
* GFWList Last-Modified: Fri, 17 May 2013 12:41:31 GMT
*/
// proxy
var P = "PROXY 192.168.1.1:8118; DIRECT";
// user rules
/*
* twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
*
* See the documentation here: http://dev.twitter.com/pages/tweet_entities
* Basically, add ?include_entities=true to your timeline call
*
* Copyright 2010, Wade Simmons
* Licensed under the MIT license
@chuquus
chuquus / README.md
Last active July 10, 2017 11:22
自用shadowsocks
@gjulianm
gjulianm / WP8PullToRefreshDetector.cs
Last active December 15, 2015 09:29
Some things weren't used. This needs a thorough review.
using Microsoft.Phone.Controls;
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
namespace Ocell.Controls