Skip to content

Instantly share code, notes, and snippets.

View breadface's full-sized avatar

jesmine breadface

View GitHub Profile
@breadface
breadface / bitbucket-pipelines.yml
Created January 25, 2023 17:39 — forked from jincod/bitbucket-pipelines.yml
Docker deployment using Bitbucket Pipelines and Heroku
pipelines:
default:
- step:
name: build and publish docker image
services:
- docker
caches:
- docker
script:
- docker build -t $APP_NAME .
@breadface
breadface / index.html
Created January 30, 2020 18:37
Simple_animation
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="./style.css" />
<title></title>
</head>
<body>
<div class="wrapper">
<div class="circle"></div>
import React from 'react'
import PropTypes from 'prop-types';
import {required, validate} from './validation';
const NOOP = () => {};
class InputWrapper extends React.Component {
static defaultProps = {
value: "",
onChange: NOOP,
@breadface
breadface / functions.php
Created May 12, 2017 16:29 — forked from kjohnson/functions.php
Max File Size filter for All-in-One WP Migration
<?php
add_filter( 'ai1wm_max_file_size', 'my_ai1wm_max_file_size', 10, 1 );
function my_ai1wm_max_file_size( $max_file_size ){
$new_max_file_size = 1073741824;
return $new_max_file_size;
}
// apply_filters( ‘ai1wm_max_file_size’, AI1WM_MAX_FILE_SIZE ) );
<h1>Two way binding:</h1>
<div>{{message}}</div>
<label for="new-message">Type: message</label>
<input type="text" [(ngModel)]="message" id="new-message" />
<h1>Lists:</h1>
<ul>
<li *ngFor="#item of nameList">
{{item.name}}
</li>
@breadface
breadface / flatten.js
Last active May 30, 2016 20:00
A function that reduces a list of multiple nested list to a single list containing all its values
/*
recursive calls to flatten will append items of inner array to the accumulator
e.g flatten :: [[1,2,[3]],4] -> [1,2,3,4]
*/
const flatten = list => {
if (!Array.isArray(list))
throw new Error(`Expecting input of type Array but found ${typeof list}`)
return list.reduce((accumulator, item) =>
accumulator.concat(Array.isArray(item) ? flatten(item) : item),