Skip to content

Instantly share code, notes, and snippets.

View lijunle's full-sized avatar

Junle Li lijunle

View GitHub Profile
@andyfowler
andyfowler / lessjs.rb
Created October 23, 2010 21:46
Jekyll plugin to render less.js - fixed for new versions of jekyll
module Jekyll
class LessCssFile < StaticFile
def write(dest)
# do nothing
end
end
# Expects a lessc: key in your _config.yml file with the path to a local less.js/bin/lessc
# Less.js will require node.js to be installed
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@brianlow
brianlow / FindConflictingReferences.cs
Created January 3, 2012 03:04
Find conflicting assembly references
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
namespace MyProject
{
[TestFixture]
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 15, 2024 23:32
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@lijunle
lijunle / gst.sh
Created September 24, 2012 17:58
translate English into Chinese using Google Translate.
#/bin/bash
translate() {
WORD=`echo $1 | sed -e 's/[[:space:]]/%20/g'`
URL="http://translate.google.cn/translate_a/t?client=t&text={$WORD}\
&hl=en&sl=en&tl=zh-CN&ie=UTF-8&oe=UTF-8&multires=1&otf=2\
&ssel=0&tsel=0&sc=1"
AGENT="Mozilla/5.0"
RESULT=`curl -s -A $AGENT $URL`
@filipw
filipw / CompiledPropertyAccessor.cs
Last active March 4, 2024 04:17
removed unnecessary classes
using System;
using System.Linq.Expressions;
using System.Reflection;
using WebApi.Delta;
namespace Hst.Deals.API.Infrastructure
{
internal class CompiledPropertyAccessor<TEntityType> : PropertyAccessor<TEntityType> where TEntityType : class
{
private Action<TEntityType, object> _setter;
@sergeifilippov
sergeifilippov / domain-nginx.conf
Created February 10, 2014 03:22
linux-dash with nginx
server {
server_name $domain_name;
root /var/www;
index index.html index.php;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Cache static files for as long as possible
location ~* \.(?:xml|ogg|mp3|mp4|ogv|svg|svgz|eot|otf|woff|ttf|css|js|jpg|jpeg|gif|png|ico)$ {
try_files $uri =404;
@sogko
sogko / app.js
Last active November 8, 2022 12:31
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@formix
formix / xd2md.cs
Last active January 17, 2024 21:13
Generates Markdown From VisualStudio XML documentation files
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
namespace Formix.Utils
{
class Program
@lijunle
lijunle / TFS_Without_VS.md
Last active August 10, 2021 18:29
TFS Build Web Application Without Visual Studio

Steps

  1. Copy C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\{Web,WebApplications} folders to build server
  2. Update NuGet to newest version by running C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\nuget.exe update -self
  3. Install .Net Framework 3.5 Runtime from server manager
  4. Install .Net Framework 4.5 Targeting Pack via install from Windows 8 SDK
    • Note 1: DONOT install Windows 8.1 version, which includes .Net Framework 4.5.1 SDK
    • Note 2: You can only download and install .Net Framework 4.5 SDK
  • Note 3: After install .Net Framework SDK, you can uninstall Windows SDK from control panel