Skip to content

Instantly share code, notes, and snippets.

@ustreamer-01647
ustreamer-01647 / neuecc.cs
Created October 12, 2014 23:25
neuecc「最小の殺害コードでけた。実際みんな死にます?」
using System;
using System.Linq.Expressions;
class Program
{
static void Main(string[] args)
{
Expression<Func<DateTimeOffset?>> expr = () => new DateTime(2014, 10, 13);
}
}
@ustreamer-01647
ustreamer-01647 / MainWindow.xaml.cs
Last active August 29, 2015 14:07
トークンの有効性を CoreTweet.Tokens.Account.VerifyCredentials() で確認する
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
@ustreamer-01647
ustreamer-01647 / smb.conf
Created October 9, 2014 14:44
samba 2:3.6.6-6+deb7u4 testparm
[global]
server string = %h server
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
@ustreamer-01647
ustreamer-01647 / a.txt.md
Last active August 29, 2015 14:07
tvtime.xml and others

dmesg

[11047.832423] usb 1-2: USB disconnect, device number 7
[11047.832685] em28xx #0: disconnecting em28xx #0 video
[11047.832704] em28xx #0: V4L2 device video1 deregistered
[11047.833226] tda9887 9-0043: destroying instance
[11047.833398] tuner-simple 9-0063: destroying instance
[11054.380124] usb 1-2: new high-speed USB device number 8 using ehci_hcd
[11054.516671] usb 1-2: New USB device found, idVendor=04bb, idProduct=0515
[11054.516689] usb 1-2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
@ustreamer-01647
ustreamer-01647 / vlc.txt
Last active August 29, 2015 14:07
GV-MVP/SZ, Debian 7.6, VLC
v4l2:///dev/video1
ntsc_m(japan), composite, 720x480, 3:2
:v4l2-standard=NTSC_M_JP :input-slave=alsa:// :v4l2-chroma= :v4l2-input=1 :v4l2-audio-input=-1 :v4l2-width=720 :v4l2-height=480 :v4l2-aspect-ratio=3\:2 :v4l2-fps=0 :no-v4l2-use-libv4l2 :v4l2-tuner=0 :v4l2-tuner-frequency=-1 :v4l2-tuner-audio-mode=-1 :no-v4l2-controls-reset :v4l2-brightness=-1 :v4l2-brightness-auto=-1 :v4l2-contrast=-1 :v4l2-saturation=-1 :v4l2-hue=-1 :v4l2-hue-auto=-1 :v4l2-white-balance-temperature=-1 :v4l2-auto-white-balance=-1 :v4l2-red-balance=-1 :v4l2-blue-balance=-1 :v4l2-gamma=-1 :v4l2-autogain=-1 :v4l2-gain=-1 :v4l2-sharpness=-1 :v4l2-chroma-gain=-1 :v4l2-chroma-gain-auto=-1 :v4l2-power-line-frequency=-1 :v4l2-backlight-compensation=-1 :v4l2-band-stop-filter=-1 :no-v4l2-hflip :no-v4l2-vflip :v4l2-rotate=-1 :v4l2-color-killer=-1 :v4l2-color-effect=-1 :v4l2-audio-volume=-1 :v4l2-audio-balance=-1 :no-v4l2-audio-mute :v4l2-audio-bass=-1 :v4l2-audio-treble=-1 :no-v4l2-audio-loudness :v4l2-set-ctrls= :live-caching=300
@ustreamer-01647
ustreamer-01647 / MainWindow.xaml
Last active August 29, 2015 14:06
testCoreTweet
<Window x:Class="testCoreTweet.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="431.182" Width="664.773" Closing="Window_Closing">
<Grid>
<Button x:Name="startSettingButton" Content="startSetting" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="99" Click="startSettingButton_Click"/>
<Label Content="Access here:" HorizontalAlignment="Left" Margin="114,10,0,0" VerticalAlignment="Top" Width="88"/>
<TextBox x:Name="pinUritextbox" HorizontalAlignment="Left" Height="23" Margin="207,10,0,0" VerticalAlignment="Top" Width="440"/>
<TextBox x:Name="pinTextbox" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Margin="67,48,0,0"/>
<Label Content="PIN:" HorizontalAlignment="Left" Margin="10,48,0,0" VerticalAlignment="Top" Width="52"/>
@ustreamer-01647
ustreamer-01647 / MainWindow.xaml
Last active August 29, 2015 14:06
CoreTweet テスト
<Window x:Class="coretweettest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="482.955" Width="669.318">
<Grid>
<Button x:Name="verifyButton" Content="認証開始" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="75" Click="verifystartButton_Click"/>
<Label Content="承認アドレス:" HorizontalAlignment="Left" Margin="107,10,0,0" VerticalAlignment="Top" Width="81"/>
<TextBox x:Name="pinTextbox" HorizontalAlignment="Left" Height="23" Margin="84,52,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" RenderTransformOrigin="0.28,0.555"/>
<Button x:Name="pinVerifyButton" Content="PIN認証" HorizontalAlignment="Left" Margin="221,51,0,0" VerticalAlignment="Top" Width="75" Click="pinButton_Click"/>
<Label x:Name="pinLabel" Content="PIN:" HorizontalAlignment="Left" Margin="15,51,0,0" VerticalAlignment="Top" Width="49"/>
@ustreamer-01647
ustreamer-01647 / twitpicjibiki.php
Last active August 29, 2015 14:06
TwitPic地引き
<?php
// twitter screen_name
define("USERNAME", "paul_ga");
// JSON保存フォルダ
define("JSONDIR", "json/");
// JSON拡張子
define("FILETAIL", ".json");
// APIアドレス
define("URL", "http://api.twitpic.com/2/users/show.json?username=");
/*
Original Information
http://pha22.net/twitterbot/ EasyBotter - プログラミングができなくても作れるTwitter botの作り方
EasyBotterバージョン2.1.3
This product includes PHP, freely available from http://www.php.net/
*/
//発言を作る
function makeTweet($file, $number = FALSE){
@ustreamer-01647
ustreamer-01647 / index.php
Last active August 29, 2015 14:01
codeiq863チケットゴブル社の旅行プランを作れ!
<?php
/**
* https://codeiq.jp/ace/yuki_hiroshi/q863 チケットゴブル社の旅行プランを作れ!
*/
// -------------------------------------------------------
// 設定
// 入力データのエンコーディング
define("INDATA_ENCODING", "SJIS");
// 内部データのエンコーディング