Skip to content

Instantly share code, notes, and snippets.

@shinout
shinout / cureapp_quiz.js
Last active March 16, 2017 12:22
次のコードは警告が出ます。何行目が原因?#cureapp_quiz をつけてtweetしよう!
1 import React from 'react'
2 import { AppRegistry, StyleSheet, Text, View } from 'react-native'
3 const styles = StyleSheet.create({
4 container: {
5 flex: 1,
6 justifyContent: 'center',
7 alignItems: 'center',
8 color: '#000000',
9 backgroundColor: '#F5FCFF',
10 },
@robdodson
robdodson / element.jade
Created December 19, 2013 23:10
Polymer elements in Jade
- var elementName = '';
block vars
polymer-element(name="#{elementName}")
block element
@joker1007
joker1007 / ginzarb_21.md
Last active April 14, 2021 06:41
Ginza.rb 21回の発表資料。rails_adminのつらみとオススメgem達。

rails_adminのつらみとオススメGemについて

rails_adminのつらみ

カスタマイズできるようで出来ない

レコード件数が一定以上になると使えない機能

  • ダッシュボード
  • 何も考えずに各モデルをカウントするのでレコード件数増えるとえらいことになる。
const { readdir } = require('fs').promises
const readdirRecursiveEnt = async (dir, ent) => {
const path = `${dir}/${ent.name}`
if (ent.isFile()) return path
if (ent.isDirectory()) {
return await readdirRecursive(path)
}
console.log(`${ent.name} is not a file or directory`)
return null
@azu
azu / js.md
Last active December 28, 2021 07:19
JavaScriptのレベル別書籍のまとめ

前提: 完成していて、比較的支持を集めていて、JavaScriptを中心にした書籍 (DOM APIよりは言語を中心とした内容)

追記: JavaScriptの入門書 #jsprimerを書いている

最初からES2015で学ぶことを前提にした初心者〜中級者向けのJavaScript本がなかったので書いてる。 ES2015でJavaScriptという言語のコア部分は大きく変わったので、それを前提とした内容にする予定。

@elzup
elzup / 0->100 arrow functions
Last active May 22, 2023 17:02
Goal: 100 Arrow functions, Anonymous function, lambda, closure example.
...
checks
// no args
// block
// implicit parameter
// assign
@neonichu
neonichu / ingress.py
Last active August 28, 2023 18:02
Demo of accessing the Ingress API.
#!/usr/bin/env python
import cookielib
import json
import mechanize
#####
GOOGLE_USER = 'you@gmail.com'
GOOGLE_PASS = 'your-password'
#####
@voluntas
voluntas / new_to_mqtt.rst
Last active October 2, 2023 06:26
初めての MQTT
@rstacruz
rstacruz / index.md
Last active November 3, 2023 09:56
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one