Skip to content

Instantly share code, notes, and snippets.

View mamboer's full-sized avatar

Levin Van mamboer

View GitHub Profile
@mamboer
mamboer / git-bash-ls-chinese-sucks
Created March 18, 2014 06:52
git bash ls命令显示中文乱码的解决办法
git bash ls命令显示中文乱码,
1,在根目录下c:\Users\xxx 下面新建一个.bashrc文件和.bash_aliases文件
2,打开bashrc文件里面加入~/.bash_aliases
3,在bash_aliases文件中加入alias ls='ls --show-control-chars --color=auto'
@mamboer
mamboer / sync-master-to-gh-pages.txt
Created November 29, 2013 08:24
easily sync your master to GitHub Pages
GitHub tip: easily sync your master to GitHub Pages
On the occasion that you’re working on a web-related project using GitHub, you may want to simply mirror your demo pages or entire master branch over to the Github Pages for your project to make them web-accessible. An example case for this would be the development of a JavaScript tool that includes an “examples/” section. It would be most convenient to just let people browse that as a webpage from GitHub, keeping it up to date every time the master branch changes.
GitHub Pages make it possible to serve web content from a branch of your repository, and the automatic page generator is very nice. To make it work in the example above, though, an update to both the base repository and the website requires at least:
git checkout master
git status
git commit -am "Committing changes to master"
git push origin master
@zspecza
zspecza / stylus-best-practices.md
Last active May 27, 2021 05:25
Stylus Best Practices

Stylus Best Practices

Introduction

This is a curated set of conventions and best practices for Stylus, an expressive, dynamic, robust and advanced CSS preprocessor. Frustrated with there not being a set of conventions set in place (that could be easily found), I set forth to find out on my own.

@kethinov
kethinov / walksync.js
Created September 22, 2013 09:04
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {
@konklone
konklone / ssl.rules
Last active August 8, 2023 08:39
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active April 1, 2024 11:21
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@laaptu
laaptu / CustomScrollView
Created September 5, 2013 08:03
Android View Pager or Horizontal Scroll View/List inside a vertical ScrollView http://stackoverflow.com/questions/2646028/android-horizontalscrollview-within-scrollview-touch-handling
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;
public class VerticalScrollView extends ScrollView {
public VerticalScrollView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
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 {
/*=====日历控件=========*/
.calendar2{*width:536px;}
.calendar1{*width:268px;}
.calendar{
border: 1px solid #e1e1e1;
background-color: #ffffff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
@mamboer
mamboer / git.config
Last active December 17, 2015 22:29 — forked from NickJosevski/git.config
## .gitconfig
[alias]
dt = difftool
mt = mergetool
[diff]
tool = bc3
[difftool]
prompt = false
[difftool "bc3"]