Skip to content

Instantly share code, notes, and snippets.

View faddah's full-sized avatar

Faddah Wolf faddah

View GitHub Profile
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
@faddah
faddah / index.html
Created March 14, 2018 16:32
My Video Search & Play Project from Stephen Grider's "Modern React With Redux" Udemy Course
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/style/style.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/48938155eb24b4ccdde09426066869504c6dab3c/dist/css/bootstrap.min.css">
<script src="https://maps.googleapis.com/maps/api/js"></script>
</head>
@faddah
faddah / App.js
Created June 18, 2017 01:03
My version of Jason Brown's React Native progress bar from his video tutorial
import React, { Component } from 'react';
import { AppRegistry, StyleSheet, Text, View, Animated } from "react-native";
class ProgressBar extends Component {
componentWillMount() {
this.animation = new Animated.Value(this.props.progress);
}
componentDidUpdate(prevProps, prevState) {
@faddah
faddah / bash.txt
Created March 31, 2017 22:38
JavaScript Console from my Angular.JS 1.6.4 Weather SPA.
angular.js:14525 Error: [$sce:insecurl] http://errors.angularjs.org/1.6.4/$sce/insecurl?p0=https%3A%2F%2Fapi.openweathermap.org%2Fdata%2F2.5%2Fforecast%2Fdaily
at https://code.angularjs.org/1.6.4/angular.min.js:6:425
at getTrusted (https://code.angularjs.org/1.6.4/angular.min.js:155:411)
at Object.c.(anonymous function) [as getTrustedResourceUrl] (https://code.angularjs.org/1.6.4/angular.min.js:157:175)
at p (https://code.angularjs.org/1.6.4/angular.min.js:102:451)
at https://code.angularjs.org/1.6.4/angular.min.js:101:207
at https://code.angularjs.org/1.6.4/angular.min.js:134:467
at m.$digest (https://code.angularjs.org/1.6.4/angular.min.js:145:417)
at b.$apply (https://code.angularjs.org/1.6.4/angular.min.js:149:113)
at HTMLFormElement.<anonymous> (https://code.angularjs.org/1.6.4/angular.min.js:284:239)
$('.top-btn').click(function(e) {
const top = $('#top')[0];
$(this).animate(
{
scrollTop: top
}, 600, 'swing', () => {console.log("going back up!")});
});
@faddah
faddah / script.js
Created December 13, 2016 01:10
JavaScript trying to add key/value pair with Map.property.set()
document.querySelector('#outcome5').innerHTML = inventors.sort((a, b) => {
const lastPersonAge = a.passed - a.year;
const nextPersonAge = b.passed - b.year;
a.set(age, lastPersonAge);
b.set(age, nextPersonAge);
return nextPersonAge > lastPersonAge ? 1 : -1;
}).map(inventor => ` ${inventor.first} ${inventor.last} — age: ${inventor.passed - inventor.year}`);
@faddah
faddah / index.html
Created October 21, 2016 05:56
React-Calc
<div id="calc-app" class="loading">Loading</div>
<div class="clear"></div>
@faddah
faddah / deploy.rb
Created October 5, 2016 00:19
Capistrano *.rb file for a WordPress deployment
# The project repo name. (one word: no spaces, dashes, or underscores)
set :application, "wp_capistrano_martian" #FIXME
# Legacy from porting from drupal, best to just leave this as "default"
set :domains, ["default"]
# Set the repository type and location to deploy from.
set :scm, :git
set :repository, "[email protected]:faddah/wp_capistrano_martian.git" #FIXME
# set :scm, :subversion
@faddah
faddah / Capfile
Last active October 5, 2016 00:37
Capfile for deploying a WordPress install
# TODO: Cap db:push should support rollback or backup in some way
# TODO: Better handling of database creation - perhaps make the deploy user a database admin?
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy.rb'
require 'capistrano/ext/multistage'
namespace :deploy do
@faddah
faddah / page-sidebar-left.php
Created August 17, 2016 19:26
my page-sidebar-left.php file from zac gordon's treehouse course on wordpress theme development
<?php
/*
Template Name: Left Sidebar
*/
<section class="two-column row no-max pad">
<div class="small-12 columns">
<div class="row">