Skip to content

Instantly share code, notes, and snippets.

package main
import (
"bufio"
"fmt"
"math"
"os"
"reflect"
"strconv"
"strings"
@katsuobushiFPGA
katsuobushiFPGA / count.gtpl
Created February 1, 2020 10:00
Build Web Application With Golang の Sessionのサンプル
<html>
<head>
<title></title>
</head>
<body>
count: {{.}}
</body>
</html>
package main
import (
"crypto/md5"
"fmt"
"html/template"
"io"
"log"
"net/http"
"net/url"
@katsuobushiFPGA
katsuobushiFPGA / competitive.go
Last active April 24, 2020 08:21
for competitive programming
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
// "regexp"
)
@katsuobushiFPGA
katsuobushiFPGA / archive.sh
Last active October 14, 2018 09:57
Gitプロジェクトのあるコミットからあるコミットの変更後 変更前ソースの差分を取得するシェル
#!/bin/bash
# archive.sh
# 変更後 変更前ソースの差分を格納するシェルです。
#
# 引数1 : 抽出したいコミットID from
# 引数2 : 抽出したいコミットID to
# 引数3 ファイルのzip名
# 引数4 プロジェクトフォルダのフルパス
mpdf
https://gray-code.com/php/output-to-pdf-file-by-mpdf-libraries/
(window.open('', '_self').opener = window).close();
<?php
class SimpleXMLExtended extends SimpleXMLElement
{
public function addCData($cdata_text)
{
$node= dom_import_simplexml($this);
$no = $node->ownerDocument;
$node->appendChild($no->createCDATASection($cdata_text));
}
<?php
date_default_timezone_set("Asia/Tokyo");
error_reporting(E_ALL);
header( "Content-Type: text/html; Charset=utf-8" );
header( "pragma: no-cache" );
header( "Expires: Wed, 31 May 2000 14:59:58 GMT" );
header( "Cache-control: no-cache" );
require_once("Mail.php");
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <memory.h>
int
main()
{
struct sockaddr_in server;