Skip to content

Instantly share code, notes, and snippets.

View keisukeYamagishi's full-sized avatar
:octocat:
easygoing 🍣

keisukeYamagishi keisukeYamagishi

:octocat:
easygoing 🍣
View GitHub Profile
@dduan
dduan / SwiftChartPong.swift
Last active May 30, 2024 11:20
Pong Game implemented with Swift Charts.
import SwiftUI
import Charts
import Combine
import Foundation
final class GameState: ObservableObject {
struct Player {
var position: Int
var halfSize: Int = 150
@niklasberglund
niklasberglund / String+md5.swift
Created December 9, 2016 07:26
String md5 extension for Swift 3
//
// Based on https://gist.github.com/finder39/f6d71f03661f7147547d
// NOTE: There's no CommonCrypto module for Swift. To make the import CommonCrypto line work do something like what's described in http://stackoverflow.com/a/29189873/257577
//
import CommonCrypto
extension String {
/**
Get the MD5 hash of this String
@nashirox
nashirox / rails-validates.rb
Last active May 31, 2024 04:11
Rubyのバリデーション用正規表現集
#
# 数字
#
# 全て数値(全角)
/\A[0-9]+\z/
# 全て数値(半角)
/\A[0-9]+\z/