Skip to content

Instantly share code, notes, and snippets.

View Code-Hex's full-sized avatar

Kei Kamikawa Code-Hex

View GitHub Profile
#! /usr/bin/perl
use strict;
use warnings;
use Fcntl qw(SEEK_SET);
use File::Temp qw(tempfile);
use Getopt::Long;
use Pod::Usage;
use Furl;
module github.com/Code-Hex/gql-filter
go 1.16
require (
github.com/graphql-go/graphql v0.7.9 // indirect
github.com/k0kubun/pp v3.0.1+incompatible // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
)
import { FC } from 'react'
type GoogleLogoProps = {
className: string
}
const GoogleLogo: FC<GoogleLogoProps> = (props: GoogleLogoProps) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
@Code-Hex
Code-Hex / grafana.rb
Created December 13, 2020 09:31
M1 mac arm64 Formula
class Grafana < Formula
desc "Gorgeous metric visualizations and dashboards for timeseries databases"
homepage "https://grafana.com"
url "https://github.com/grafana/grafana/archive/v7.3.5.tar.gz"
sha256 "c63cf5b24733261386777a91e34b2d7646965e4a9adcea64dca519c5bc2cbede"
license "Apache-2.0"
head "https://github.com/grafana/grafana.git"
bottle do
cellar :any_skip_relocation
@Code-Hex
Code-Hex / main.go
Created December 6, 2020 06:44
investigate memory usage
package main
/*
#cgo darwin CFLAGS: -x objective-c -fobjc-arc
#cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization
# include "virtualization.h"
*/
import "C"
import (
"fmt"
@Code-Hex
Code-Hex / calendar.js
Created August 3, 2020 13:35
日めくりカレンダー
import styled from 'styled-components'
export const Calendar = ({ date }) => {
const month = ['Jan','Feb','Mar','Apr','May','June','July','Aug','Sept','Oct','Nov','Dec']
return (
<Border color="#000">
<Header>{month[6]}</Header>
<Body>25</Body>
</Border>
)
@Code-Hex
Code-Hex / .vimrc
Created May 23, 2020 13:56
vim terminal api
" https://github.com/google/vim-maktaba/blob/f630b985facf383ae1657d569ff69582224cca04/autoload/maktaba/path.vim#L9
func s:pathJoin(left, right)
if a:left =~# '\v\\@<!%(\\\\)*\zs/$'
return a:left . a:right
elseif empty(a:left)
return a:right
endif
return a:left . '/' . a:right
endfunc
@Code-Hex
Code-Hex / async.rs
Created May 18, 2020 12:50
rust 入門
use futures::future::{Abortable, AbortHandle, Aborted};
use futures::executor::block_on;
fn main() {
println!("Hello, world!");
block_on(run());
}
async fn run() {
@Code-Hex
Code-Hex / nvim_log.md
Last active April 28, 2020 14:58
neovim 調査
  • UI_BRIDGE_CALL(b, stop, 1, b);ui_bridge_stop_event を呼ぶ in ui_bridge_stop
  • ui_bridge_attachui_bridge_stop をセットしてる
  • これらを呼び出す ui_call_stopos_exit の中で呼ばれてる
@Code-Hex
Code-Hex / signal.go
Created April 25, 2020 14:03
shell 上でどんな signal を受け取ったか見る
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
)
func main() {