Skip to content

Instantly share code, notes, and snippets.

View qwIvan's full-sized avatar

yang chanfa qwIvan

View GitHub Profile
@shellexy
shellexy / nginx 反向代理 blog.conf
Created May 13, 2012 08:40
在 vps 用 nginx 反向代理 wordpress/blogger
# /etc/nginx/sites-available/blog.shellexy.info
server {
resolver 8.8.8.8;
listen 80;
server_name blog.shellexy.info;
#access_log off;
access_log /var/log/nginx/blog.shellexy.info.access.log;
location / {
#避免远方启用压缩导致无法替换纯文本
proxy_set_header Accept-Encoding "";
@trustin
trustin / fontfix.patch
Last active November 30, 2015 15:47
OpenJDK 7 font rendering patch for Linux (cd openjdk/jdk; patch -p1 < fontfix.patch)
diff -r 19cc3b567644 make/sun/font/Makefile
--- a/make/sun/font/Makefile Wed Jan 22 12:34:24 2014 -0800
+++ b/make/sun/font/Makefile Fri Jan 24 21:41:23 2014 +0900
@@ -138,7 +138,7 @@
ifeq ($(USING_SYSTEM_FT_LIB), false)
FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
endif
- OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype
+ OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype -lfontconfig
endif
@aleksandara
aleksandara / fontfix.patch
Created June 21, 2012 03:27 — forked from trustin/fontfix.patch
OpenJDK 7 font rendering patch for Linux (cd openjdk/jdk; patch -p1 < fontfix.patch)
diff -r 96a023de3ddf make/sun/font/Makefile
--- a/make/sun/font/Makefile Wed Jun 06 18:39:46 2012 -0700
+++ b/make/sun/font/Makefile Fri Jun 08 12:52:01 2012 +0900
@@ -128,7 +128,7 @@
ifeq ($(USING_SYSTEM_FT_LIB), false)
FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
endif
- OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype
+ OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype -lfontconfig
endif
@ibeex
ibeex / foo.log
Created August 4, 2012 13:46
Flask logging example
A warning occurred (42 apples)
An error occurred
@sharonbn
sharonbn / SslUtil.java
Last active August 21, 2022 05:48
SSL/TLS connection from Eclipse Paho Java client to mosquitto MQTT broker
import java.io.*;
import java.nio.file.*;
import java.security.*;
import java.security.cert.*;
import javax.net.ssl.*;
import org.bouncycastle.jce.provider.*;
import org.bouncycastle.openssl.*;
public class SslUtil
@willurd
willurd / web-servers.md
Last active May 4, 2024 07:22
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@kpnemo
kpnemo / gist:5847136
Created June 24, 2013 00:59
aerender.exe example
C:\Users\Administrator\Dropbox\CreaTV\AAE_projects\boris_ae_proj>"c:\Program Files\Adobe\Adobe After Effects CS6\Support Files\aerender.exe" -project "C:\Users\Administrator\Dropbox\CreaTV\AAE_project
s\boris_ae_proj\opener.aep" -comp "opener" -RStemplate "Best Settings" -OMtemplate "H.264" -v "ERRORS_AND_PROGRESS" -mp -output "C:\video2.mp4"
global !p
import string, vim
import textwrap
_snips_fns = {}
def py(*args):
import re
old_a = vim.eval('@a')
@waiting-for-dev
waiting-for-dev / merge2ass.sh
Last active October 16, 2018 16:19
Script to run mplayer with two subtitles tracks at the same time. Usage: mplayer2 video sub1 sub2. merge2ass.sh (http://www.abclinuxu.cz/blog/Joseho_blog/2007/7/30/188299) script must be in the path.
#!/bin/bash
# merge2ass.sh - script for merging two text-subtitles into an ass subtitle file
# version 0.9b, 02-feb-2013
# comments/criticism/praise to jose1711-gmail-com
# dependencies: mplayer (if your subtitle files need to be converted to srt), gnu utils
# thanks to:
# - d.watzke for comments
# - belisarivs for testing
@yareally
yareally / MyActivity.scala
Last active August 29, 2015 14:08
Scala features being used on Android
package com.example.android_scala
import android.app.Activity
import android.os.Bundle
import android.view.View
import android.view.View.OnClickListener
import android.widget.{Button, Toast}
import com.example.android_scala.MyActivity._
class MyActivity extends Activity {