Skip to content

Instantly share code, notes, and snippets.

@okinjp
okinjp / authorize_interaction.php
Last active April 30, 2024 09:36
みおきー・みーくりあ!・ふぃーお!で使われているauthorize_interaction(PHP製)の処理(抜粋)
<?php
$show_api = "/api/ap/show";
$instance = "mi.okin-jp.net";
// クエリからuriを取得
$uri = isset($_GET['uri']) ? $_GET['uri'] : "";
// ログインユーザーのトークンを取得
$authi = isset($_COOKIE['token']) ? $_COOKIE['token'] : "";
// エラーハンドリング
if ($authi == "" || $uri == "") {
@gmk57
gmk57 / CoroutineTimer.kt
Last active April 30, 2024 09:36
Coroutine-based solution for delayed and periodic work
/**
* Coroutine-based solution for delayed and periodic work. May fire once (if [interval] omitted)
* or periodically ([startDelay] defaults to [interval] in this case), replacing both
* `Observable.timer()` & `Observable.interval()` from RxJava.
*
* In contrast to RxJava, intervals are calculated since previous run completion; this is more
* convenient for potentially long work (prevents overlapping) and does not suffer from queueing
* multiple invocations in Doze mode on Android.
*
* Dispatcher is inherited from scope, may be overridden via [context] parameter.
@matthewzring
matthewzring / markdown-text-101.md
Last active April 30, 2024 09:36
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@davialexandre
davialexandre / gruvbox_dark.json
Created June 23, 2019 18:09
Gruvbox Dark color scheme for the new Windows Terminal
{
"background" : "#282828",
"black" : "#282828",
"blue" : "#458588",
"brightBlack" : "#928374",
"brightBlue" : "#83A598",
"brightCyan" : "#8EC07C",
"brightGreen" : "#B8BB26",
"brightPurple" : "#D3869B",
"brightRed" : "#FB4934",
@mbinna
mbinna / effective_modern_cmake.md
Last active April 30, 2024 09:30
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@edokeh
edokeh / index.js
Last active April 30, 2024 09:29
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
<Name>IDM Full ToolKit</Name>
<Version>4.7</Version>
<Download>https://onedrive.live.com/download?cid=860C6C270D0296DF&resid=860C6C270D0296DF%21175&authkey=APaTYii-uJSRpD0</Download>
link khác:
https://uploading.vn/vtyktzy6ukao
https://veryfiles.com/apcik7jdp3wz
[IDM Toolbar]
<URL>https://drive.google.com/uc?export=download&id=0B3sqdC3gTItxWDNubEFCZEI0RkE</URL>
AWSTemplateFormatVersion: '2010-09-09'
Description: AWS Backup daily CloudFormation configuration
Resources:
BackupPlan:
Type: AWS::Backup::BackupPlan
Properties:
BackupPlan:
BackupPlanName: default
BackupPlanRule:
- RuleName: daily-backups
@scottrigby
scottrigby / plistDiff
Created January 7, 2017 22:15
Shows CLI diff between two plist files
#!/bin/bash
## @file
## Shows CLI diff between two plist files.
##
## Normally, Mac plist files are binary, so diffs do not display. However,
## there are cases where seeing diffs is important. For example, when tracking
## changes via Mackup's git storage option.
##
## Note this option allows seeing plist diffs without fully installing Xcode
@MattSeen
MattSeen / .gitconfig
Last active April 30, 2024 09:20
These are a series of the Git alias I use on use on a daily basis. I have included references to the places where I have found each one to give the authors due credit.
[alias]
# Source: http://stackoverflow.com/questions/7066325/how-to-list-show-git-aliases#answer-7067489
# Found on stackoverflow list all available aliases ==
alias = config --get-regexp '^alias.*'
s = status
ss = status --short
ssb = status --short --branch
co = commit