Skip to content

Instantly share code, notes, and snippets.

Avatar
🥳
Watching anime

castaneai castaneai

🥳
Watching anime
View GitHub Profile
View ptes.cpp
#include "../headers/EARTH_PT3.h"
#include "../headers/EX_Buffer.h"
#include "Windows.h"
int main(void)
{
auto dll = LoadLibrary(L"SDK_EARTHSOFT_PT3.dll");
auto newBusFunc = reinterpret_cast<EARTH::PT::Bus::NewBusFunction>(GetProcAddress(dll, "_"));
EARTH::PT::Bus* bus;
@castaneai
castaneai / client.go
Created Jul 29, 2019
[gRPC Channelz] show trace on client connection
View client.go
package main
import (
"context"
"github.com/golang/protobuf/ptypes"
"google.golang.org/grpc/reflection"
"log"
"net"
"os"
"time"
@castaneai
castaneai / tbf06.gs
Created Mar 18, 2019
tbf06 checked count
View tbf06.gs
function fetch() {
var headers = {"Cookie": "user=xxxxxxxxxxxxxxxxxx;"}; // <- insert your cookie here
var params = {
"method": "GET",
"headers": headers,
};
var url = "https://techbookfest.org/api/circle/own";
var resp = UrlFetchApp.fetch(url, params);
return JSON.parse(resp.getContentText());
}
@castaneai
castaneai / migrate-repo.sh
Created Jan 8, 2019
Migrating private repo to GitHub from GitLab.
View migrate-repo.sh
#!/bin/bash
GITLAB_USER=castaneai
GITHUB_USER=castaneai
REPO_NAME=$1
git clone --mirror https://gitlab.com/$GITLAB_USER/$REPO_NAME && cd $REPO_NAME.git && hub create -p $REPO_NAME && git remote set-url origin https://github.com/$GITHUB_USER/$REPO_NAME.git && git push --mirror
View keybase.md

Keybase proof

I hereby claim:

  • I am castaneai on github.
  • I am castaneai (https://keybase.io/castaneai) on keybase.
  • I have a public key ASB0UigtWHu8Gzb_dS1eE-uLPeKvrsRfuDpDea9x7MHGbAo

To claim this, I am signing this object:

@castaneai
castaneai / App.tsx
Created Nov 20, 2018
react list start
View App.tsx
import React, { Component } from 'react';
import './App.css';
import ItemList from "./ItemList";
import Item from "./Item";
interface Props {
}
interface State {
items: Item[]
}
@castaneai
castaneai / main.go
Created Nov 1, 2018
gae/go + spanner + opencensus
View main.go
package main
import (
"cloud.google.com/go/spanner"
"context"
"contrib.go.opencensus.io/exporter/stackdriver"
"fmt"
"go.opencensus.io/plugin/ochttp"
"go.opencensus.io/trace"
"log"
View attack.htc
<public:attach event="onload" for="window" onevent="initialise()" />
<script language="javascript">
function initialise() {
document.write("goooooooooooooooooooooooooold");
}
</script>
@castaneai
castaneai / tee.go
Created Oct 25, 2018
io.TeeReader example
View tee.go
package main
import (
"os"
"io"
"log"
)
func main() {
filename := os.Args[1]
@castaneai
castaneai / utime.py
Created Apr 11, 2018
for migrating screenshots
View utime.py
import os
import glob
import datetime
import shutil
datetime_formats = [
'%Y_%m_%d_%H_%M_%S',
'%Y_%m_%d_%H'
]