Skip to content

Instantly share code, notes, and snippets.

package main
import (
"bufio"
"os"
"strings"
"fmt"
"time"
"io"
)
@yujp
yujp / logsplit.rs
Last active February 11, 2020 07:59
use std::env;
use std::fs::{File, OpenOptions};
use std::io::{BufRead, BufReader, Write, BufWriter};
use std::collections::HashMap;
use chrono::{DateTime, Local};
fn main() {
let args: Vec<String> = env::args().collect();
if args.len() < 2 {
println!("file name must be specified.");
package main
import (
"crypto/ed25519"
"crypto/rand"
"crypto/x509"
//"crypto/x509/pkix"
"encoding/pem"
"log"
//"math/big"
package clientname
import (
"log"
"os"
"context"
"io/ioutil"
"net/http"
"golang.org/x/oauth2"
"golang.org/x/oauth2/clientcredentials"
# how to compile: nim c -d:release hello.nim
import asyncdispatch
import httpClient
proc main() {.async.} =
var client = newAsyncHttpClient()
echo await client.getContent("http://google.com")
waitFor main()
package main
// copyright 2019 yu
// example of pararell uploading on http
import (
"fmt"
"io"
"log"
"math"
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>TailwindCSS Excample</title>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
</head>
extern crate reqwest;
extern crate oauth2;
extern crate url;
use oauth2::{
AuthUrl,
ClientId,
ClientSecret,
Scope,
TokenResponse,
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/httputil"
)
<?php
echo json_encode("\"'<>&", JSON_HEX_QUOT | JSON_HEX_TAG | JSON_HE_AMP);