Skip to content

Instantly share code, notes, and snippets.

View srea's full-sized avatar
🐢
Hi!

Yuki Tamazawa srea

🐢
Hi!
View GitHub Profile
@nashirox
nashirox / rails-validates.rb
Last active May 31, 2024 04:11
Rubyのバリデーション用正規表現集
#
# 数字
#
# 全て数値(全角)
/\A[0-9]+\z/
# 全て数値(半角)
/\A[0-9]+\z/
@HomerJSimpson
HomerJSimpson / playground.swift
Created October 19, 2015 21:25
POST application/x-www-form-urlencoded via swift
//: Playground - noun: a place where people can play
import UIKit
import XCPlayground
XCPSetExecutionShouldContinueIndefinitely(true)
extension NSMutableURLRequest {
/// Percent escape
@polbins
polbins / README.md
Last active February 29, 2024 09:58
Simple RecyclerView Divider

Simple RecyclerView Divider

Simple Horizontal Divider Item Decoration for RecyclerView

    mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
            getApplicationContext()
    	));

NOTE: Add item decoration prior to setting the adapter

@dbachrach
dbachrach / ConditionalJsonModel.h
Created August 12, 2014 16:04
ConditionalJSONModel
#import <Foundation/Foundation.h>
#import <JSONModel/JSONModel.h>
@interface ConditionalJsonModel : JSONModel
- (NSDictionary*)classMapping;
- (NSString*)classNameProperty;
@alexandreraulin
alexandreraulin / gist:f4b1504aec9d25f5af08
Last active June 20, 2019 09:03
Script for iOS Universal Framework compilation with Xcode 6
# This script is based on Jacob Van Order's answer on apple dev forums https://devforums.apple.com/message/971277
# See also http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/ for the start
# To get this to work with a Xcode 6 Cocoa Touch Framework, create Framework
# Then create a new Aggregate Target. Throw this script into a Build Script Phrase on the Aggregate
######################
# Options
@kelvinn
kelvinn / cmd.sh
Created July 24, 2014 02:55
Example of using Apache Bench (ab) to POST JSON to an API
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@staltz
staltz / introrx.md
Last active June 7, 2024 23:39
The introduction to Reactive Programming you've been missing
@ChuckJHardy
ChuckJHardy / MainActivityTest.java
Created March 19, 2014 10:44
Android MainActivityTest Example
package co.uk.myapp.beachroidtest;
import android.app.Fragment;
import android.app.Instrumentation;
import android.test.ActivityInstrumentationTestCase2;
import android.test.TouchUtils;
import android.test.ViewAsserts;
import android.view.View;
public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActivity> {

BASE API v1 ドキュメント (β版)

BASEのAPIの開発者向けのドキュメントです。

概要

このAPIを使うと、あなたのアプリケーションとBASEを連携させることができます。

例えば

  • BASEのアカウントでログインする
  • BASEのショップの商品情報を取得する