Skip to content

Instantly share code, notes, and snippets.

View axross's full-sized avatar
🍣
= 🍚 + 🐟 + ❤️

Kohei axross

🍣
= 🍚 + 🐟 + ❤️
View GitHub Profile
@axross
axross / Brewfile
Created May 13, 2021 22:41
My Brewfile on May 2020
tap "homebrew/cask"
tap "homebrew/cask-versions"
################
# General Use
################
tap "github/gh"
brew "fish"
brew "git"
@axross
axross / Brewfile
Created November 15, 2020 00:28
Brewfile 202011
tap "homebrew/cask"
tap "homebrew/cask-versions"
################
# General Use
################
tap "github/gh"
brew "fish"
brew "httpie"
  • ssskdkdkdkd
  • kakakakaka

sklaks

import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark(),
debugShowCheckedModeBanner: false,
home: Scaffold(
import { runBenchmarks, bench } from "https://deno.land/std/testing/bench.ts";
// 1119. Remove Vowels from a String
// https://leetcode.com/problems/remove-vowels-from-a-string/
function removeVowelsByLoop(S: string): string {
let removed = "";
for (const char of S) {
switch (char) {
case "a":
@axross
axross / migrate.js
Created October 7, 2019 21:49
Migration script changes Node ts files into Deno ts files
const fs = require("fs");
const path = require("path");
const fileNames = fs.readdirSync(path.resolve(__dirname, "./solutions"));
const testFiles = fileNames.filter(fileName => fileName.endsWith("_test.ts"));
for (const fileName of testFiles) {
// const fileName = testFiles[Math.floor(Math.random() * testFiles.length)];
// const fileName = "search_a2d_matrix2_test.ts";
import * as React from "react";
import * as ReactDOMServer from "react-dom/server";
function SomeComponent() {
return React.createElement(StyledDiv, null, "Hello!");
}
const StyledDiv = styled.div`
color: red;
`;
@axross
axross / BinaryHeap.ts
Last active August 18, 2019 04:47
BinaryHeap
export default class BinaryHeap<T> {
constructor(orderComparator: OrderComparator<T>) {
this.orderComparator = orderComparator;
this.values = [];
}
private orderComparator: OrderComparator<T>;
private values: T[];
get length(): number {
class A extends React.Component {
constructor(props, context) {
super(props, context);
this.globalCallbackName = 'kdjlwkqe';
this.ref = React.createRef();
}
componentDidMount() {
global[this.globalCallbackName] = () => new google.maps.Map(this.ref.current, {
@axross
axross / message_tray.dart
Last active January 14, 2019 20:28
Wrapper object to handle cloud messaging in an appropriate way
import 'dart:async';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:meta/meta.dart';
class MessageTray {
MessageTray({@required FirebaseMessaging messaging})
: assert(messaging != null),
_onMessage = StreamController(),
_onResume = StreamController(),
_onLaunch = StreamController() {