Skip to content

Instantly share code, notes, and snippets.

View tmyt's full-sized avatar
🏠
Working from home

Yutaka TSUMORI tmyt

🏠
Working from home
View GitHub Profile
@tmyt
tmyt / gist:7448282
Last active December 28, 2015 05:09
Nexus5で充電LEDを点灯させるパッチ
diff --git a/liblight/lights.c b/liblight/lights.c
index d8f2961..aa6ae74 100644
--- a/liblight/lights.c
+++ b/liblight/lights.c
@@ -29,6 +29,7 @@
#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/stat.h>
@tmyt
tmyt / gist:7274731
Last active December 27, 2015 05:29
$ repo init -u https://android.googlesource.com/platform/manifest android-4.4_r1
$ repo sync
$ cd device/samsung
$ git clone https://android.googlesource.com/device/samsung/maguro
$ git clone https://android.googlesource.com/device/samsung/tuna
$ cd tuna
## fix for sensor hal changes
$ curl https://gist.github.com/tmyt/7273607 | patch -p1
$ cd ../maguro
## add Launcher3 package
diff --git a/aosp_maguro.mk b/aosp_maguro.mk
index fc1140b..b95b3ca 100644
--- a/aosp_maguro.mk
+++ b/aosp_maguro.mk
@@ -16,3 +16,7 @@
$(call inherit-product, device/samsung/maguro/full_maguro.mk)
PRODUCT_NAME := aosp_maguro
+
+PRODUCT_PACKAGES += \
@tmyt
tmyt / gist:7273607
Created November 1, 2013 23:31
Galaxy Nexus patch
diff --git a/libsensors/sensors.cpp b/libsensors/sensors.cpp
index 2a33731..08029b1 100644
--- a/libsensors/sensors.cpp
+++ b/libsensors/sensors.cpp
@@ -80,15 +80,15 @@ static struct sensor_t sSensorList[LOCAL_SENSORS + MPLSensor::numSensors] = {
{ "GP2A Light sensor",
"Sharp",
1, SENSORS_LIGHT_HANDLE,
- SENSOR_TYPE_LIGHT, powf(10, 125.0f/ 24.0f) * 4, 1.0f, 0.75f, 0, { } },
+ SENSOR_TYPE_LIGHT, powf(10, 125.0f/ 24.0f) * 4, 1.0f, 0.75f, 0, 0, 0, { } },
<Page
x:Class="App31.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App31"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="using:App31"
xmlns:c="using:App31.Conditions"
xmlns:system="using:System"
@tmyt
tmyt / gist:6150072
Created August 4, 2013 11:18
Wine for Mac でMacネイティブドライバを使っているときに、Altキーとして動くキーをCommandからOptionに変更するパッチ
diff --git a/dlls/winemac.drv/keyboard.c b/dlls/winemac.drv/keyboard.c
index 98d17ba..2c92752 100644
--- a/dlls/winemac.drv/keyboard.c
+++ b/dlls/winemac.drv/keyboard.c
@@ -236,14 +236,14 @@ static const struct {
{ VK_BACK, 0x0E, TRUE }, /* kVK_Delete */
{ 0, 0, FALSE }, /* 0x34 unused */
{ VK_ESCAPE, 0x01, TRUE }, /* kVK_Escape */
- { VK_RMENU, 0x38 | 0x100, TRUE }, /* kVK_RightCommand */
- { VK_LMENU, 0x38, TRUE }, /* kVK_Command */
[Profile0]
Caption=Default
UserName=dummy
oauth_token=dummy
oauth_token_secret=dummy
kazoo04
alstamber
ourxz
akuraru
penguin2716
i315
numa08
@tmyt
tmyt / gist:5205053
Created March 20, 2013 14:24
HttpClientでWSSE認証するコード
using System;
using System.Net;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
namespace gist.laboratory
{
class WsseClientHandler : HttpClientHandler
{
#include <windows.h>
#include <dwrite.h>
#include <atlcomcli.h>
#pragma comment(lib, "dwrite.lib")
CComPtr<IDWriteFactory> pFactory;
int main()
{