Skip to content

Instantly share code, notes, and snippets.

View ngs's full-sized avatar
🎣
Fly Fishing

Atsushi NAGASE ngs

🎣
Fly Fishing
View GitHub Profile
var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=[],d=0,e=this.data.length;e>d;d++){var f=this.data.charCodeAt(d);f>65536?(b[0]=240|(1835008&f)>>>18,b[1]=128|(258048&f)>>>12,b[2]=128|(4032&f)>>>6,b[3]=128|63&f):f>2048?(b[0]=224|(61440&f)>>>12,b[1]=128|(4032&f)>>>6,b[2]=128|63&f):f>128?(b[0]=192|(1984&f)>>>6,b[1]=128|63&f):b[0]=f,this.parsedData=this.parsedData.concat(b)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function i(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c<a.length&&0==a[c];)c++;this.num=new Array(a.length-c+b);for(var d=0;d<a.length-c;d++)this.num[d]=a[d+c]}function j(a,b){this.totalCount=a,this.dataCount=b}function k(){this.buffer=[],this.length=0}function m(){return"undefined"!=typeof CanvasRender
@ngs
ngs / install.sh
Last active December 15, 2021 16:59 — forked from lwickline/gist:8c061def750833c544034a66199dc23f
Install vim 8 on a Raspberry Pi 3
# Modified from the gist @https://gist.github.com/odiumediae/3b22d09b62e9acb7788baf6fdbb77cf8
sudo apt-get remove -y --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install -y liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install -y checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
//: Playground - noun: a place where people can play
import UIKit
import PlaygroundSupport
import Differ
//let viewController = GraphViewController(string1: "kitten", string2: "sitting")
//viewController.view.frame = CGRect(x: 0, y: 0, width: 500, height: 500)
//PlaygroundPage.current.liveView = viewController.view
import Foundation
import PlaygroundSupport
import UIKit
import QuartzCore
class IndicatorView: UIView {
private enum GroupAnimationKey: String {
case inner = "inner-circle-group-animation"
case outer = "outer-circle-group-animation"
}
//
// AVAudioPCMBufferExtension.swift
//
// Created by Atsushi Nagase on 2018/05/14.
// Copyright © 2018 LittleApps Inc. All rights reserved.
//
import Speech
extension AVAudioPCMBuffer {
{
"4.1.2":"https://developers.google.com/identity/sign-in/ios/sdk/google_signin_sdk_4_1_2.zip"
}
FILES=$(find Carthage/Build/iOS/*.framework -name Info.plist | xargs grep -l '<string>com.firebase.Firebase')
for F in $FILES; do
NAME=$(/usr/libexec/PlistBuddy -c "Print :CFBundleName" "$F")
plutil -replace CFBundleIdentifier -string "com.firebase.Firebase.$NAME" $F
done
const AWS = require('aws-sdk');
const path = require ('path');
const https = require ('https');
exports.handler = (event, context, callback) => {
const { query, endpoint, index, doctype } = event;
const size = 10;
const from = parseInt(event.from) || 0;
if (!query || !endpoint || !index || !doctype) {
callback(new Error('Missing required parameters'), event);
var rows = document.querySelectorAll('tr.days')
var idx = 0
function fmtDigit(n) {
return n < 10 ? '0' + n : String(n);
}
function fmtTime(time) {
return fmtDigit(Math.floor(time / 60)) + ':' + fmtDigit(time % 60);
}