This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script will install the files below. | |
# Please look through them first so you know what will happen. | |
# Install by running this command: | |
# curl -fL https://gist.githubusercontent.com/stefansundin/7003429/raw/install-kbd-backlight.sh | sh | |
# Uninstall with: | |
# sudo rm /opt/kbd-{backlight,lock}.sh /etc/pm/sleep.d/70-kbd-backlight | |
# rm ~/.config/autostart/kbd-{backlight,lock}.sh.desktop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T, typename T2> | |
static inline T cast_to(const T2& from) | |
{ | |
std::stringstream ss; | |
T to; | |
ss << from; | |
ss >> to; | |
return to; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
应用的评价链接地址 | |
把 | |
itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@ | |
改成 | |
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ************** oggsteamer.h | |
#define NUM_BUFFERS 4 | |
#define BUFFER_SIZE 65536 | |
#define BUFFER_MSECS 10 | |
typedef struct { | |
char *data; | |
int data_length; | |
int seek_offset; |