Skip to content

Instantly share code, notes, and snippets.

View wataash's full-sized avatar

Wataru Ashihara wataash

View GitHub Profile
@minazou67
minazou67 / redmine-available-plugins-0.md
Last active December 27, 2017 03:36
Available Plugins of Redmine

Available Plugins of Redmine

Redmine の plugin はメンテナンスされていないものが多く、最新バージョンで動作するか不明だったのでメモ。

Version

@joanbm
joanbm / nvidia-fix-linux-5.11.patch
Last active February 21, 2021 11:36
Tentative fix for NVIDIA 460.32.03 driver for Linux 5.11-rc2
From b6272b5b9eb2546383e4590ebf8d9578f3e2b947 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Thu, 7 Jan 2021 18:40:33 +0100
Subject: [PATCH] Tentative fix for NVIDIA 460.32.03 driver for Linux 5.11-rc2
---
conftest.sh | 17 ++++++++++++-
nvidia-drm/nvidia-drm-crtc.c | 17 +++++++++++++
nvidia-drm/nvidia-drm-drv.c | 15 ++++++++++++
nvidia-drm/nvidia-drm-gem-user-memory.c | 24 +++++++++++++++++++
@yoku0825
yoku0825 / please_clause_for_5651.patch
Created April 1, 2021 05:39
MySQL 5.6.51にPLEASE句を実装するパッチ
--- ./sql/sql_yacc.yy.orig 2021-01-05 19:19:59.000000000 +0900
+++ ./sql/sql_yacc.yy 2021-04-01 11:52:06.167953286 +0900
@@ -2,2 +2,3 @@
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, yoku0825. All rights reserved.
@@ -1570,2 +1571,3 @@
%token SSL_SYM
+%token PLEASE_SYM /* yoku0825 */
%token STARTING
import os
import sys
from wsgiref.simple_server import make_server
PORT = int(os.getenv("PORT") or "8080")
def app(environ, start_response):
path = environ["PATH_INFO"]
if path == "/sse":
@jpetazzo
jpetazzo / Sample result.txt
Created August 17, 2011 22:13
Compare the available nginx versions and their modules (according to debian packages descriptions)
nginx-full nginx-extras nginx-light
Access YES YES YES
Addition File AIO Mail Core - YES -
Addition Mail Core YES - -
Auth Basic YES YES YES
Auto Index YES YES YES
Browser YES YES -
Charset YES YES YES
Echo YES YES -
Embedded Lua - YES -
@jiffyclub
jiffyclub / conda.fish
Last active December 8, 2021 08:46
Activate and deactivate commands for working with conda environments in the fish shell. Currently assumes you are switching to a named environment, not specifying a directory.
function condalist -d 'List conda environments.'
for dir in (ls $HOME/miniconda3/envs)
echo $dir
end
end
function condactivate -d 'Activate a conda environment' -a cenv
if test -z $cenv
echo 'Usage: condactivate <env name>'
return 1

PowerShell Gives You Wrongs

三年半の格闘の末に僕が見たもの、あるいは試行錯誤の覚書、すなわち二番煎じ。

はじめに

PowerShell 3.0以上のバージョンを使用すること。2.0以下のバージョンは、書き捨ては仕方ないとしても、保守対象のスクリプトを書くべきではないし、あらゆる言及に値しない。全力でバージョンアップをしろ。

式と文の常識を超えて

@raineorshine
raineorshine / java-exception-handling-best-practices.md
Last active March 13, 2023 02:54
5 Great Resources for Exception Handling Best Practices in Java

General Tip

"The trick is to catch exceptions at the proper layer, where your program can either meaningfully recover from the exception and continue without causing further errors, or provide the user with specific information, including instructions on how to recover from the error. When it is not practical for a method to do either of these, simply let the exception go so it can be caught later on and handled at the appropriate level."

Resources

Advantages of Exceptions
Excellent example of separating error-handling code from program logic

Three Rules for Effective Exception Handling
Longer explanation and case study of exception use, including the basic principles of "throw early" and "catch late". Clear and thorough.

@Integralist
Integralist / 1. linux utilities.md
Last active December 1, 2023 15:04
Different Linux utility commands (e.g. top, ps, strace, lsof, netstat, ifconfig, iftop, iptraf, tcpdump, wireshark)

Start up a container (whichever Linux flavour takes your fancy):

docker run -it ubuntu /bin/bash
docker run -it centos /bin/bash
  • top: check what CPU and Memory running processes are utilising
  • ps: see what processes are running
  • strace: monitor interactions between processes
@vipulmathur
vipulmathur / PyCharmIntelliJShared.md
Last active February 5, 2024 10:24
Run PyCharm and IntelliJ IDEA on the same codebase

Problem

PyCharm and IntelliJ IDEA use the .idea directory to keep project information. While the two seem to be able to read each other's files, they (currently) don't understand the other's settings.

Solution

The work-around (till they learn to play better with each other) is to keep their .idea folders separate, while sharing a common project source tree. Instructions follow below.