Skip to content

Instantly share code, notes, and snippets.

View ProblemaResolt's full-sized avatar
👎

ぼなお ProblemaResolt

👎
View GitHub Profile
@ProblemaResolt
ProblemaResolt / mac_animation_all_off.sh
Created December 9, 2019 01:12
Mac のアニメーション動作を全部消すShell
#!/bin/bash
# opening and closing windows and popovers
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# smooth scrolling
defaults write -g NSScrollAnimationEnabled -bool false
# showing and hiding sheets, resizing preference windows, zooming windows
# float 0 doesn't work

#Dockerを使っていて以下のようなエラーが出た場合。

ERROR: for mysql  Cannot start service mysql: driver failed programming external connectivity on endpoint test-mysql (b2c5bfe3339ba18ad0892ba8fc5a1f427a89b3915035bc12b0c4c1207e016f75): Error starting userland proxy: Bind for 0.0.0.0:3306 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

エラー内容のところに Bind for 0.0.0.0:3306 failed: port is already allocated が入っているため3306ポートが使用されているのがわかる。 まずは使用されている port 3306 を探す。

Linux & Mac の場合

@ProblemaResolt
ProblemaResolt / Program.cs
Created July 4, 2018 01:31
fibonatch 数列 C#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
@ProblemaResolt
ProblemaResolt / fibo.exs
Last active September 6, 2019 02:02
フィボナッチ数列の50番目をとるやつ For Elixir
defmodule Memorize do
def fib(0), do: 0
def fib(1), do: 1
def fib x do
case Agent.get(__MODULE__, &Map.get(&1, x)) do
nil ->
f = fib(x - 1) + fib(x - 2)
Agent.update(__MODULE__, &Map.put(&1, x, f))
f
f -> f