Skip to content

Instantly share code, notes, and snippets.

#include <windows.h>
#include <stdio.h>
#pragma pack(push, 2)
#define RT_ICON MAKEINTRESOURCE(3)
#define RT_GROUP_ICON MAKEINTRESOURCE((ULONG_PTR)(RT_ICON) + 11)
/* Icon file header */
typedef struct
@missdeer
missdeer / ProxyUtils.java
Created July 23, 2017 14:22 — forked from mcxiaoke/ProxyUtils.java
set proxy for Android WebView, worked on api 9 ~ 19
package com.mcxiaoke.next.utils;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.net.Proxy;
import android.os.Build;
import android.os.Parcelable;
import android.util.ArrayMap;
import android.util.Log;
@missdeer
missdeer / gist:e22631912ddc858f4894
Created November 5, 2015 04:16 — forked from msmuenchen/gist:9318327
KeePass v2.x (KDBX v3.x) file format
Convention: Byte array notation as it would appear in a hexeditor.
= Layout=
KDBX files, the keepass database files, are layout as follows:
1) Bytes 0-3: Primary identifier, common across all kdbx versions:
private static $sigByte1=[0x03,0xD9,0xA2,0x9A];
2) Bytes 4-7: Secondary identifier. Byte 4 can be used to identify the file version (0x67 is latest, 0x66 is the KeePass 2 pre-release format and 0x55 is KeePass 1)
/* This code was written by Sergejs Kovrovs and has been placed in the public domain. */
import QtQuick 2.0
MouseArea {
property point origin
property bool ready: false
signal move(int x, int y)
signal swipe(string direction)
package main
import (
"fmt"
"log"
"net"
"net/mail"
"net/smtp"
"crypto/tls"
)
@missdeer
missdeer / boost.sh
Created January 26, 2014 04:23 — forked from pa-zz-yco/boost.sh
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for the iPhone.
# Creates a set of universal libraries that can be used on an iPhone and in the

Install Git 1.8.1.2 from source on CentOS 6.3

These are the Terminal commands I recently used (Feb 2013) to install Git 1.8.1.2 from source on CentOS 6.3. I ran this in a VirtualBox VM after a fresh install from the ISO.

You mileage will vary as the yum packages are updated over time. The yum install line below should include all the dependencies, at least it did for me. Eventually yum install git will include 1.8.x but until then I hope this helps.

cd ~/Downloads
su
yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel curl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker