Skip to content

Instantly share code, notes, and snippets.

View chipcerio's full-sized avatar
🏠
Working from home

Chip Cerio chipcerio

🏠
Working from home
View GitHub Profile
@chipcerio
chipcerio / EmailValidator.kt
Created November 10, 2017 08:51 — forked from ironic-name/EmailValidator.kt
Kotlin regex email validator function
fun isEmailValid(email: String): Boolean {
return Pattern.compile(
"^(([\\w-]+\\.)+[\\w-]+|([a-zA-Z]|[\\w-]{2,}))@"
+ "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\."
+ "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9]))|"
+ "([a-zA-Z]+[\\w-]+\\.)+[a-zA-Z]{2,4})$"
).matcher(email).matches()
}
@chipcerio
chipcerio / README-Template.md
Created March 7, 2018 05:45 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@chipcerio
chipcerio / .eslintrc
Last active May 11, 2018 04:20 — forked from radiovisual/.eslintrc
React Native AirBnB ESLint Config
{
"parser": "babel-eslint",
"plugins": [
"react",
"react-native"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
class MainActivity : Activity, Adapter.OnCellClickListener {
override fun onCreate() {
recyclerView.setAdapter(Adapter(this)) // this refers to OnCellClickListener
}
override fun onCellClick(item: ChattrItem) {
// hoooray i have access to ChattrItem!!!
}
}
export default [
'Abbaye de Belloc',
'Abbaye du Mont des Cats',
'Abertam',
'Abondance',
'Ackawi',
'Acorn',
'Adelost',
'Affidelice au Chablis',
"Afuega'l Pitu",
@chipcerio
chipcerio / ISSUE_template.md
Created October 3, 2018 05:58
github issue template

Subject of the issue

Describe your issue here.

Your environment

  • version of angular-translate
  • version of angular
  • which browser and its version

Steps to reproduce

Tell us how to reproduce this issue. Please provide a working demo, you can use this template as a base.

@chipcerio
chipcerio / ID.js
Created October 16, 2018 09:33
ID - a unique ID/name generator for JavaScript
// Generate unique IDs for use as pseudo-private/protected names.
// Similar in concept to
// <http://wiki.ecmascript.org/doku.php?id=strawman:names>.
//
// The goals of this function are twofold:
//
// * Provide a way to generate a string guaranteed to be unique when compared
// to other strings generated by this function.
// * Make the string complex enough that it is highly unlikely to be
// accidentally duplicated by hand (this is key if you're using `ID`
[user]
name = ${FIRST_NAME} ${LAST_NAME}
email = ${EMAIL}
[color]
ui = true
[alias]
co = checkout
br = branch
ci = commit
st = status
@chipcerio
chipcerio / presigned_url.xml
Created March 8, 2019 00:43
presigned url error
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
<AWSAccessKeyId>AKIAJUXLWEL5UIOWJI3Q</AWSAccessKeyId>
<StringToSign>AWS4-HMAC-SHA256
20190308T004238Z
20190308/us-west-1/s3/aws4_request
447d6d7de950c7456f7f8c41e00f9a3b7c2072362f28294088b3c0892f96c2d6</StringToSign>
<SignatureProvided>b0e74c3b58cded32ae78ef7ac0fe69730cf6de277cd94c25eb9f8c3764e01163</SignatureProvided>
@chipcerio
chipcerio / ssh_config
Created May 27, 2019 04:41
ssh configuration for multiple profile
# personal Bitbucket
Host bitbucket.org
User git
Hostname bitbucket.org
AddKeysToAgent yes
UseKeychain yes
PreferredAuthentications publickey
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa