Skip to content

Instantly share code, notes, and snippets.

View ngwing's full-sized avatar
💯

Anthony ngwing

💯
  • Beijing
View GitHub Profile
@ngwing
ngwing / glibc-2.17_centos6.sh
Created December 8, 2017 06:54 — forked from harv/glibc-2.17_centos6.sh
update glibc to 2.17 for CentOS 6
#! /bin/sh
# update glibc to 2.17 for CentOS 6
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm
sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \
@ngwing
ngwing / encode_uri_rfc3986.erl
Created December 29, 2015 13:17 — forked from renatoalbano/encode_uri_rfc3986.erl
erlang percent encoding that works with utf-8
-module(encode_uri_rfc3986).
-author('Renato Albano <renatoalbano@gmail.com>').
-export([encode/1]).
%% Taken from <http://erlangexamples.com/>,
%% from <http://github.com/CapnKernul/httparadise>
%% and <http://www.erlang.org/doc/man/edoc_lib.html>
encode([C | Cs]) when C >= $a, C =< $z ->
@ngwing
ngwing / GridRecyclerView
Created December 2, 2015 16:44 — forked from Musenkishi/GridRecyclerView
GridRecyclerView. A Grid-specific RecyclerView that can use gridLayoutAnimation.
/*
* Copyright (C) 2014 Freddie (Musenkishi) Lust-Hed
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@ngwing
ngwing / mod_logxml.erl
Created November 21, 2015 13:21 — forked from developerworks/mod_logxml.erl
Ejabberd module: log message,iq,presence stanza to a xml log file.
-module(mod_logxml).
-author('badlop@ono.com').
-behaviour(gen_mod).
-export([
start/2,
init/7,
stop/1,
send_packet/3,
receive_packet/4
]).