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
#include <fcntl.h> | |
#include <sys/ioctl.h> | |
#include <hwdep.h> | |
#include <error.h> | |
#include <stdio.h> | |
#include "rt56xx_ioctl.h" | |
int main() | |
{ |
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
static const struct snd_soc_dapm_route rt5670_dapm_routes[] = { | |
#ifdef USE_ASRC | |
{"I2S1", NULL, "ASRC enable"}, | |
{"I2S2", NULL, "ASRC enable"}, | |
#endif | |
{ "micbias1", NULL, "DAC L1 Power" }, | |
{ "micbias1", NULL, "DAC R1 Power" }, | |
{ "DMIC1", NULL, "DMIC L1" }, |
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
#!/usr/bin/perl | |
# usage: | |
# vmutt [maildir] [command] | |
# eg. | |
# vmutt ~/mail/flagged "mutt -f ~/mail/flagged" | |
use warnings; | |
use strict; | |
use File::Basename qw/basename dirname/; |
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 | |
# | |
# LightDM wrapper to run around X sessions. | |
echo "Running X session wrapper" | |
# Load profile | |
for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do | |
if [ -f "$file" ]; then | |
echo "Loading profile from $file"; |
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
hi DiffAdd term=reverse cterm=bold ctermbg=green ctermfg=white | |
hi DiffChange term=reverse cterm=bold ctermbg=cyan ctermfg=black | |
hi DiffText term=reverse cterm=bold ctermbg=gray ctermfg=black | |
hi DiffDelete term=reverse cterm=bold ctermbg=red ctermfg=black | |
:syntax on | |
:set smartindent | |
:set ls=2 | |
colorscheme pablo | |
:set ffs=unix |
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/bash | |
create_partition() | |
{ | |
local part_type=$1 | |
local part_num=$2 | |
local part_size=$3 | |
echo -n "create_partition($part_type, $part_num, $part_size)..." | |
case $part_type in | |
p|e|l);; |
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
commit fe9083623469a2e8e533179226766b84bfcd09a9 | |
Author: charles-chang <charles-chang@royaltek.com> | |
Date: Wed Dec 3 16:40:16 2014 +0800 | |
fix nullpointerexceotion on ImageIcon | |
diff --git a/AndroidScreencast/build.xml b/AndroidScreencast/build.xml | |
index 58c87df..42b2a32 100644 | |
--- a/AndroidScreencast/build.xml | |
+++ b/AndroidScreencast/build.xml |
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 | |
mkdir /cbox | |
mount -t vfat /dev/block/mmcblk0p7 /cbox | |
uspct=$(df | grep cbox | awk '{ print $5 }' | cut -d'%' -f1) | |
echo $uspct | |
if [ $uspct -ge 90 ]; then | |
echo 'great!' | |
rm -r /cbox/Android | |
rm -r /cbox/DCIM | |
fi |
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
static ssize_t rt5625_mic_ctrl_show(struct device *dev, | |
struct device_attribute *attr, char *buf) | |
{ | |
struct i2c_client *client = to_i2c_client(dev); | |
struct rt5625_priv *rt5625 = i2c_get_clientdata(client); | |
struct snd_soc_codec *codec = rt5625->codec; | |
int data = snd_soc_read(codec, RT5625_MIC_CTRL); | |
return sprintf(buf, "%x",data); |
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
// stack_trace.c | |
// | |
// gcc stack_trace.c -ldw -lunwind -g -o stack_trace | |
#define UNW_LOCAL_ONLY | |
#include <elfutils/libdwfl.h> | |
#include <libunwind.h> | |
#include <stdio.h> |
OlderNewer