Skip to content

Instantly share code, notes, and snippets.

@khlizard
khlizard / uBlacklist.txt
Last active August 11, 2022 12:08
uBlacklist backup
*://*.036izu.net/*
*://*.2ch.sc/*
*://*.2nn.jp/*
*://*.5chmap.com/*
*://*.access01.com/*
*://*.ailbainpro.com/*
*://*.airmore.com/*
*://*.altema.jp/*
*://*.annneme.net/*
*://*.apowersoft.jp/*
@lightrush
lightrush / README.md
Last active September 2, 2023 22:57
Normalize volume level with PulseAudio

Normalize volume level with PulseAudio and simultaneous output

This should work conceptually on any Linux OS with PulseAudio but these particular instructions are for Ubuntu. There are two major reasons for using simultaneous output. The first is self-evident - we can output to say a bluetooth headset and wired headphones at the same time to enable two people to watch a movie with headphones on a single computer. The second reason is a sort of a convenience for setup. We know the simultaneous sink name so the default.pa config would work without modification so long as simultaneous output is enabled. If we were to set this up without that, we'd have to customize the config with our specific device sink name. That's totally doable but personally I always setup simultaneous output. That's why I haven't described the alternative in this gist.

@mattn
mattn / README.md
Last active March 19, 2020 12:08
gvim で使える等幅フォント
@kotakanbe
kotakanbe / mohikan_slack_channels.md
Last active October 14, 2023 19:26
モヒカンslack( https://mohikan.slack.com )のチャネルリスト
@stknohg
stknohg / windows_guest_network_patch.diff
Last active December 22, 2015 07:42
VagrantでWindowsゲストのNIC名が日本語の場合でもIPアドレスの設定を行える様にするパッチ。
--- ./guest_network.rb.orig 2015-01-06 13:42:26.000000000 +0900
+++ ./guest_network.rb 2015-01-21 11:40:38.341846700 +0900
@@ -40,8 +40,8 @@
def configure_dhcp_interface(nic_index, net_connection_id)
@logger.info("Configuring NIC #{net_connection_id} for DHCP")
if !is_dhcp_enabled(nic_index)
- netsh = "netsh interface ip set address \"#{net_connection_id}\" dhcp"
- @communicator.execute(netsh)
+ command = "&{exit (Get-WMiObject Win32_NetworkAdapterConfiguration -Filter \"Index=#{nic_index}\").EnableDHCP().ReturnValue}"
+ @communicator.execute(command)
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@matsubo
matsubo / credit_card_bin_codes.md
Last active September 27, 2024 19:02
Credit Card Bin Codes

概要

クレジットカード番号には法則があり、先頭6桁でカードの種類を識別、分類することができる。

詳細はISO/IEC 7812で規定されている。

ISO/IEC 7812 - Wikipedia https://ja.wikipedia.org/wiki/ISO/IEC_7812

先頭の6桁を銀行識別番号(Bank Identification Number、略称:BIN)ないしは発行者識別番号(Issuer Identification Number、略称:IIN)と呼び、この先頭6桁でカード発行会社(イシュア、issuer)が判るようになっている。

@dittore
dittore / datetime_parser.py
Created October 19, 2012 08:50
Parse input into YYYY-MM-DD HH:MM:SS (PYTHON)
def parse_datetime(d):
"""
Datetime parser
Creates datetimes from input into format yyyy-mm-dd hh:mm:ss
Needs proper validation!
Should accept following:
yyyy