Skip to content

Instantly share code, notes, and snippets.

View devNoiseConsulting's full-sized avatar

Michael Flynn devNoiseConsulting

View GitHub Profile
@devNoiseConsulting
devNoiseConsulting / RaidTrain.md
Last active July 22, 2018 12:52
MontCo/ChesCo Zapdos Day for #6/#5

Raid Train Starting in Chesterbrook

Route Section 1

This is generally where most of the people will do their raiding since there are 5 EX Gyms in Wilson Farm Park. Try to be there early so you can start raiding at 2pm.

  1. Wetland Mitigation 2
  • Raid
@devNoiseConsulting
devNoiseConsulting / gist:fb6195fbd09bfb2c1f81367dd9e727ed
Last active December 9, 2020 05:33 — forked from romainneutron/gist:5340930
Download large files using Guzzle 6.3
<?php
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
$url = "https://domain.tld/large-file.mp4";
$tmpFile = tempnam(sys_get_temp_dir(), 'guzzle-download');
$client = new Client(array(
@devNoiseConsulting
devNoiseConsulting / challenge3.html
Created April 16, 2018 01:22
Free React.js Bootcamp, Day 3 Challenge
<!DOCTYPE html>
<html>
<head>
<title>Popular Repos</title>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src='https://unpkg.com/babel-standalone@6/babel.min.js'></script>
</head>
<body>
<div id='app'></div>
@devNoiseConsulting
devNoiseConsulting / challenge2.html
Created April 14, 2018 18:23
Free React.js Bootcamp, Day 2 Challenge
<!DOCTYPE html>
<html>
<head>
<title>First React App</title>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src='https://unpkg.com/babel-standalone@6/babel.min.js'></script>
</head>
<body>
<div id='app'></div>
@devNoiseConsulting
devNoiseConsulting / nukeItFromOrbit.sh
Last active April 1, 2018 16:16
nukeItFromOrbit.sh - Script to kill processes and start them up again. "It’s the only way to be sure."
#!/bin/sh
ps -ef | egrep "\.py|\./run" | cut -b10-15 | xargs kill -9
sleep 1
sudo systemctl restart mysql
sleep 1
@devNoiseConsulting
devNoiseConsulting / dp20180301.js
Created March 1, 2018 17:46
Divide String - PhillyDev Slack #daily_programmer - 20180301
const divideString = function(string, size) {
const regex = new RegExp(`(.{${size}})`);
let chunks = string.split(regex).filter(v => v);
if (chunks[chunks.length - 1].length == size) {
return chunks;
} else {
return [chunks.slice(0, -1), chunks[chunks.length - 1]];
}
console.log(chunks);
};
@devNoiseConsulting
devNoiseConsulting / dp20180226.js
Created February 26, 2018 23:58
Reverse Odd Runs - PhillyDev Slack #daily_programmer - 20180226
const reverseOddRuns = function(...numbers) {
let tempStorage = [];
return numbers
.reduce((acc, v, i) => {
if (v % 2 == 0) {
acc = acc.concat([...tempStorage.reverse(), v]);
tempStorage = [];
} else {
tempStorage.push(v);
}
@devNoiseConsulting
devNoiseConsulting / dp20180222.js
Created February 23, 2018 21:20
Alphabet Spiral- PhillyDev Slack #daily_programmer - 20180222
let getSideSize = function(size) {
if (size < 1) {
return 0;
} else if (size == 1) {
return 2;
} else {
return size + getSideSize(size - 1);
}
};
@devNoiseConsulting
devNoiseConsulting / dp20180221.js
Last active February 23, 2018 21:19
Draw Doodle II - PhillyDev Slack #daily_programmer - 20180221
// Third solution based off of casiotone's solution.
const drawDoodle = function(doodle) {
let padSize = 0;
return doodle
.split('')
.map(v => {
padSize = v == '/' ? padSize - 1 : padSize;
padSize = padSize < 0 ? 0 : padSize;
let padding = padSize;
padSize = v == '\\' ? padSize + 1 : padSize;
@devNoiseConsulting
devNoiseConsulting / dp20180220.js
Created February 20, 2018 15:13
Draw Doodle - PhillyDev Slack #daily_programmer - 20180220
const drawDoodle_1 = function(doodle) {
doodle = doodle.split('');
doodle = doodle.map((v, i) => {
const padding = new Array(i).fill(' ');
return padding.concat([v]).join('');
});
return doodle.join('\n');
};
const drawDoodle_2 = function(doodle) {