Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
najeira / AppDelegate.swift
Last active Jul 11, 2020
Flutter with platform
View AppDelegate.swift
import UIKit
import Flutter
@objc class AppDelegate: FlutterAppDelegate, MyViewDelegate {
var flutterViewController: FlutterViewController?
var flutterResult: FlutterResult?
override func application(
_ application: UIApplication,
najeira / gist:1372274
Created Nov 17, 2011
Create snapshot of Amazon RDS by Python
View gist:1372274
# -*- coding: utf-8 -*-
import datetime
from boto import rds
AccessKey = '****'
AccessSecret = '****'
DbinstanceId = '****'
Region = 'ap-northeast-1'
najeira / error.txt
Created Oct 3, 2018
Could not build flutter/engine for Android
View error.txt
ninja: Entering directory `out/android_release'
[1/5] LINK clang_x86/gen_snapshot
FAILED: clang_x86/gen_snapshot
../../buildtools/mac-x64/clang/bin/clang++ -isysroot /Applications/ -mmacosx-version-min=10.12 -m32 -flto -stdlib=libc++ -Wl,-dead_strip -Wl,-search_paths_first -L. -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/../../.. -Wl,-pie -Xlinker -rpath -Xlinker @executable_path/Frameworks -o clang_x86/gen_snapshot -Wl,-filelist,clang_x86/gen_snapshot.rsp -framework CoreFoundation -framework CoreServices -framework AppKit -framework ApplicationServices -framework Carbon -framework CoreVideo -framework Foundation -framework OpenGL -framework Security -framework IOKit -ldl -lpthread
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Applications/
najeira /
Last active Sep 28, 2018
Go2 generics


contracts が不要な場合の例について。

() は可読性が低い。関数の引数の定義や、呼び出しで使われているため。記号としては、他の言語でも使われている <> を使う。記号が他の箇所と異なり、カッコ内にtypeキーワードがなくても、それがGenericsであることが分かるため、typeキーワードもなくてよい。

func Print<T>(s []T) {
	// ...
najeira /
Last active Jul 24, 2018
Flutter/Dart コーディング規約




if (hoge) {
najeira / locale.dart
Last active May 25, 2018
Test for Flutter font selection
View locale.dart
// A test for
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
void main() {
runApp(new MaterialApp(
localizationsDelegates: GlobalMaterialLocalizations.delegates,
locale: const Locale("ja", "JP"),
supportedLocales: [
najeira / gist:280c347ecb6bd9f2e680
Created Aug 15, 2014
Golang BigQuery example
View gist:280c347ecb6bd9f2e680
package main
import (
bigquery ""
func main() {
View keymap.c
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
najeira / gist:5682804
Created May 31, 2013
verify Amazon SNS message
View gist:5682804
def verify(message):
# the string to sign
sign_str = []
for key in ("Message", "MessageId", "Subject", "Timestamp", "TopicArn", "Type"):
if key == "Subject" and key not in message:
sign_str = "¥n".join(sign_str)
You can’t perform that action at this time.