Skip to content

Instantly share code, notes, and snippets.

View coetry's full-sized avatar
⚛️
compiling my thoughts into something simpler

Allen Hai coetry

⚛️
compiling my thoughts into something simpler
  • Houston
View GitHub Profile
// The following arrays will be used through the questions:
const words = [ 'cattywampus', 'snickersnee', 'lollygag', 'pandiculation', 'ratoon' ];
const numbers = [ 8, 3, 22, 0, -73, 15 ];
// Question 1:
// Use forEach to console.log all the words in the words array. Do not write a for loop.
function logWords(){
// words.forEach(word => console.log(word));
words.forEach(function(word){
console.log(word)
@coetry
coetry / todolist.jsx
Created June 14, 2018 12:18 — forked from marekdano/todolist.jsx
Simple Todo list app using React and ES6 with functions delete a todo and/or mark a todo as done
import React from 'react';
/*
Todo app structure
TodoApp
- TodoHeader
- TodoList
- TodoListItem #1
- TodoListItem #2
@coetry
coetry / .vimrc
Created May 5, 2018 16:49
coetry vimrc
syntax on
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@coetry
coetry / index.js
Created December 9, 2017 05:59
quran.json
const fs = require('fs')
const xml2js = require('xml2js')
const parser = new xml2js.Parser()
var Quran = undefined
fs.readFile(__dirname + '/quran.xml', (err, data) => {
parser.parseString(data, (err, result) => {
Quran = result
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
86fa48e98084 wordpress:4.8.3-php7.1-fpm "docker-entrypoint..." About a minute ago Up About a minute 9000/tcp, 0.0.0.0:8080->80/tcp ammar-selo-photography
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of ppx_traverse_builtins failed at "jbuilder build
--only-packages ppx_traverse_builtins --root . -j 4 @install".
[ERROR] The compilation of sexplib failed at "jbuilder build -p sexplib -j 4".
[ERROR] The compilation of ocaml-migrate-parsetree failed at "jbuilder build -p
ocaml-migrate-parsetree -j 4".
[ERROR] The compilation of ocaml-compiler-libs failed at "jbuilder build
--only-packages ocaml-compiler-libs --root . -j 4 @install".
[ERROR] The compilation of topkg failed at "ocaml pkg/pkg.ml build --pkg-name
topkg --dev-pkg false".
(defn 3-col-grid-container
"Takes a vector of child components
and makes wraps them in a grid"
[children]
[:div {:style {:display "grid"
:grid-template-columns "1fr 1fr 1fr"
:grid-gap "40px 40px"
@coetry
coetry / stripe.pl
Last active August 2, 2017 07:50
following synopsis of Net::Stripe CPAN module hoping to get some 200s from stripe, but get an error instead :(
#!/usr/bin/env perl
use strict;
use warnings;
use Net::Stripe;
my $stripe = Net::Stripe->new(api_key => $ENV{STRIPE_SECRET});
my $card_token = 'a token';
my $charge = $stripe->post_charge(
@coetry
coetry / build.boot
Created July 11, 2017 18:16
boot cljs serving error
(set-env!
:source-paths #{"src/cljs"}
:resource-paths #{"html"}
:dependencies '[[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.473"]
[adzerk/boot-cljs "1.7.228-2"]
[pandeiro/boot-http "0.7.6"]
[org.clojure/tools.nrepl "0.2.12"]
[adzerk/boot-reload "0.5.1"]
Allens-MBP:~ allen$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3794f769d9bf eugeneware/docker-wordpress-nginx "/bin/bash /start.sh" 2 days ago Up 45 minutes 0.0.0.0:80->80/tcp, 3306/tcp texascarma