Skip to content

Instantly share code, notes, and snippets.

View komeiji-satori's full-sized avatar

void komeiji-satori

  • 幻想郷
View GitHub Profile
ObjC.import('Foundation');
var app = Application.currentApplication()
app.includeStandardAdditions = true
var args = $.NSProcessInfo.processInfo.arguments;
var argv = []
var argc = args.count // -[NSArray count]
for (var i = 0; i < argc; i++) {
argv.push( ObjC.unwrap( args.objectAtIndex(i) ) ) // -[NSArray objectAtIndex:]
}
#!/bin/bash
# The MIT License (MIT)
# Copyright (c) 2013 Alvin Abad
# https://alvinabad.wordpress.com/2013/03/23/how-to-specify-an-ssh-key-file-with-the-git-command
if [ $# -eq 0 ]; then
echo "Git wrapper script that can specify an ssh-key file
Usage:
git.sh -i ssh-key-file git-command
<?php
function remote_exec($host = null, $port = null, $auth = [], $commands = [])
{
$result = [];
$connection = ssh2_connect($host, $port);
if ($auth["type"] == "pubkey") {
ssh2_auth_pubkey_file($connection, $auth["username"], $auth["public_key"], $auth["private_key"], $auth["password"]);
} else {
ssh2_auth_password($connection, $auth["username"], $auth["password"]);
<?php
class MagicCrypt
{
public static $iv = "";
public static $encryptKey = "";
public function __construct($key = '', $iv = '')
{
$this->key = $key;
$this->iv = $iv;
<?php
class GoogleTokenGenerator {
/**
* Generate and return a token.
*
* @param string $source Source language
* @param string $target Target language
* @param string $text Text to translate
*
* @return mixed A token
<?php
class GoogleTokenGenerator {
/**
* Generate and return a token.
*
* @param string $source Source language
* @param string $target Target language
* @param string $text Text to translate
*
* @return mixed A token
<?php
function utf8_strrev($str){
preg_match_all('/./us', $str, $ar);
return join('', array_reverse($ar[0]));
}
@komeiji-satori
komeiji-satori / composer.json
Last active March 7, 2018 11:14
QueryListDemo
{
"require": {
"jaeger/querylist": "^4.0",
"rmccue/requests": "^1.7",
}
}

Keybase proof

I hereby claim:

  • I am komeiji-satori on github.
  • I am satorimoe (https://keybase.io/satorimoe) on keybase.
  • I have a public key whose fingerprint is 4063 B254 ABA4 E0A9 88DA 3515 4B50 4D21 7829 B98E

To claim this, I am signing this object:

@komeiji-satori
komeiji-satori / telegram_unoffical_oauth_api.md
Last active October 8, 2017 14:32
Telegram UnOffical OAuth API 文档

Telegram UnOffical OAuth API 文档


Demo地址: 点击这里


用户认证请求

过程详解

请求地址: