Skip to content

Instantly share code, notes, and snippets.

@GtTmy
GtTmy / myChoco.config
Last active August 29, 2015 14:16
chocolatey設定ファイル
<?xml version="1.0"?>
<packages>
<package id="GoogleChrome" />
<package id="thunderbird" />
<package id="dropbox" />
<package id="python3" />
<package id="sublimetext3" />
<package id="githubforwindows" />
<package id="virtualbox" />
<package id="conemu" />
@GtTmy
GtTmy / gist:01ec800ee1a3bc2cac9b
Created June 21, 2015 12:06
wordpress my_child_pages
function my_child_pages_t(){
$all_content = "";
$child_posts = get_posts( 'numberposts=-1&order=ASC&orderby=post_title&post_type=page&post_parent=' . get_the_ID() );
if ( $child_posts ) {
foreach ( $child_posts as $child ) {
$c_title = apply_filters( 'the_title', $child->post_title );
$c_content = get_extended( $child->post_content );
$c_content = apply_filters( 'the_content', $c_content['main'] );
$all_content = $all_content . "<div class=\"entry-content\">" . "<h1>" . $c_title . "</h1>" . $c_content . "</div>";
}
module myAND(
input a,b,
output c
);
assign c = a & b;
endmodule
@GtTmy
GtTmy / myStylishSettings.txt
Last active November 11, 2015 02:02
Stylish設定ファイル
@font-face{
font-family: "MS Pゴシック";
src: local("メイリオ");
}
@font-face{
font-family: "MS PGothic";
src: local("メイリオ");
}
@font-face{
font-family: "MS UI Gothic";
@GtTmy
GtTmy / howToInstallPython.md
Created November 27, 2015 06:50
Pythonのソースからのインストール手順

Pythonのソースからのインストール手順

ubuntu 15.04、Python3.5でテスト

# sudo apt-get install build-essential

全モジュールをコンパイルするために、依存ライブラリを入れる。

# sudo apt-get install -y libbz2-dev libreadline-dev libssl-dev libsqlite3-dev libgdbm-dev zlib1g-dev tk-dev tcl-dev liblzma-dev libncurses5-dev
@GtTmy
GtTmy / centos7-pub.md
Created November 30, 2015 14:10
CentOS7で公開鍵認証

CentOS7で公開鍵認証

よくミスする箇所

# chmod 700 ~/.ssh
# chmod 600 ~/.ssh/authorized_keys

ホームディレクトリ含め,すべての階層の権限が適切に設定されている必要がある.

@GtTmy
GtTmy / .latexmkrc
Created December 31, 2015 09:21
latexmk設定ファイル
if ($^O eq 'MSWin32') {
$latex = 'platex %O -kanji=utf8 -guess-input-enc -synctex=1 -interaction=nonstopmode %S';
$bibtex = 'pbibtex %O -kanji=utf8 %B';
$makeindex = 'mendex %O -U -o %D %S';
$dvipdf = 'dvipdfmx -f noembed.map %O -o %D %S';
$dvips = 'dvips %O -z -f %S | convbkmk -g > %D';
$ps2pdf = 'ps2pdf.bat %O %S %D';
$pdf_mode = 3;
if (-f 'C:/Program Files/SumatraPDF/SumatraPDF.exe') {
$pdf_previewer = '"C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance';
@GtTmy
GtTmy / myLaTeXbuild.sublime-build
Last active December 31, 2015 09:40
latexmkをsublime text3で使う設定
{
"cmd": ["latexmk", "-pv", "$file_name"],
"selector": "source.tex",
}
@GtTmy
GtTmy / tail.md
Created February 1, 2016 06:09
最新のファイルをtailする
@GtTmy
GtTmy / json.cs
Created June 27, 2018 17:07
Json.Netでのデシリアライズの確認
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
namespace JsonDemo
{
class Program
{
public static void Main(string[] arg)
{