Skip to content

Instantly share code, notes, and snippets.

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

Kohei axross

🍣
= 🍚 + 🐟 + ❤️
View GitHub Profile
@axross
axross / how_to_install_ruby2.0_and_rails4.0.2_with_rbenv.md
Last active August 13, 2021 16:24
rbenvを使用しており、Rubyの普段使っているバージョンが2.0系でない方へ

rbenvを使用しており、普段使っているRubyのバージョンが2.0系でない方へ

Railsチュートリアル(4.0版)では、Rubyのバージョンとして2.0系を用いており、動作確認をしたGemを用いています。
Gemの中にはバージョンごとに別のコードで実装されているものがありますので、Rubyのバージョンを2.0系に合わせることをおすすめします。

下記に、rbenv + ruby-buildでRubyをインストールしている方向けに、Ruby2.0系でRailsチュートリアルを進めるための方法を書いておきます。

インストール可能なバージョンの確認

@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, {