Skip to content

Instantly share code, notes, and snippets.

View macchky's full-sized avatar

macchky

View GitHub Profile
@hfiguiere
hfiguiere / fandom-track-list.txt
Last active February 27, 2024 19:25
Fandom/Wikia filters
[Adblock Plus 3.1]
! Title: Wiki/Fandom List, and more
!
! Block Wikia/Fandom trackers
!
||fastly-insights.com/b^
||fastly-insights.com/o.svg*
||fastly-insights.com/static/scout.js^
||beacon.wikia-services.com/__track/
||pixels.ad.gt/api/v1/getpixels^
@yaraki
yaraki / ClockLiveData.kt
Last active December 21, 2019 07:02
This LiveData provides the time in hh:mm:ss format, updating the value every second
package io.github.yaraki.dependencyinjection
import android.arch.lifecycle.LiveData
import android.os.Handler
import android.os.Looper
import android.os.SystemClock
import android.text.format.DateFormat
import java.util.*
class ClockLiveData : LiveData<CharSequence>() {
anonymous
anonymous / firewall.user
Created May 29, 2017 18:22
OpenWrt map-e (JPNE v6plus) において、割当ポート240個をちゃんと使わせるための設定。
## /etc/firewall.user
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
@AgentRev
AgentRev / HvT.sqf
Last active January 21, 2020 05:54
Improved High Value Target script
// @file Version: 2.0
// @file Name: HvT.sqf
// @file Author: Cael817, CRE4MPIE, LouD, AgentRev
#define HVT_AMOUNT 50000 // how much a player needs to be carrying to become a HvT
#define HINT_DELAY 60 // number of seconds between each HvT reminder hint
#define MARKER_REFRESH 30 // number of seconds between each HvT marker refresh
if (isServer) then
{
@koyopro
koyopro / amazon-calc.js
Last active April 2, 2022 08:23 — forked from polamjag/amazon-calc.js
Amazonで一年間に使った金額と、注文履歴のTSVを出力するブックマークレット【2015年版】
// Amazonの注文履歴をTSV形式で出力するスクリプト
//
// 2015-01-01 時点での DOM 構造に対応, GoogleCrome, Opera でテスト済。
// formatEntry関数を書き換えれば自由な書式で出力できます。
//
// 参考:
// - Amazonの注文履歴をCSV形式にして出力するスクリプト
// https://gist.github.com/arcatdmz/8500521
// - Amazon で使った金額の合計を出す奴 (2014 年バージョン)
// https://gist.github.com/polamjag/866a8af775c44b3c1a6d
@polamjag
polamjag / amazon-calc.js
Last active September 7, 2022 11:23 — forked from arcatdmz/amazon-csv.js
Amazon で使った金額の合計を出す奴 (2014-2016 年バージョン)
// Amazon で使った金額の合計を出す奴
//
// 使い方:
// 1. 全部コピーする (右上の Raw をクリックした先でやるのが楽)
// 2. Amazon の注文履歴ページ ( https://www.amazon.co.jp/gp/css/order-history/ ) を開く
// 3. F12 または 右クリ→要素の検証 とかで出てくる開発者ツールのコンソール (JavaScript REPL) にペースト
// 4. エンターで実行
// (Firefox はなんか allow pasting とタイプしろみたいなことを言われるので従う)
// 5. しばらく待つと alert で合計金額を表示
//
@rummelonp
rummelonp / auth.rb
Created October 27, 2012 05:37
ツイッターのアクセストークンとか割りと簡単に取得する感じのやつ
# -*- coding: utf-8 -*-
require 'sinatra/base'
require 'padrino-helpers'
require 'haml'
require 'oauth'
class Auth < Sinatra::Base
register Padrino::Helpers
set :haml, format: :html5
@repeatedly
repeatedly / d_master.md
Last active July 16, 2024 17:07
D言語基礎文法最速マスター

他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.

1. 基礎

ソースファイル

ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.

main

D言語のmainはCとは違い以下のようなシグネチャです.