Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Golightly magician11

View GitHub Profile
@magician11
magician11 / front-end.js
Last active Aug 2, 2017
How To Use jQuery To Post A CSV File To A Node.js Server
View front-end.js
// using jQuery
$("#2020data").submit(function(e) {
$.ajax({
url: "https://e0d92634.ngrok.io/test",
type: "POST",
data: new FormData(this),
processData: false,
contentType: false
});
@magician11
magician11 / headless-chrome.js
Last active Aug 12, 2020
How to grab the page source from any dynamically generated webpage and then process it .
View headless-chrome.js
const CDP = require('chrome-remote-interface');
const chromeLauncher = require('chrome-launcher');
const cheerio = require('cheerio');
(async function() {
const launchChrome = () =>
chromeLauncher.launch({ chromeFlags: ['--disable-gpu', '--headless'] });
const chrome = await launchChrome();
const protocol = await CDP({ port: chrome.port });
@magician11
magician11 / currency-conversion.html
Last active Aug 21, 2018
How To Create Your Own Currency Conversion App
View currency-conversion.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Currency Conversion</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
@daliborgogic
daliborgogic / delay.js
Created Dec 16, 2016
Node.js Async/Await delay
View delay.js
'use strict'
const timeout = ms => new Promise(res => setTimeout(res, ms))
function convinceMe (convince) {
let unixTime = Math.round(+new Date() / 1000)
console.log(`Delay ${convince} at ${unixTime}`)
}
async function delay () {
View boyer_resume.md

Carleen Michele Boyer

carleenboyer@gmail.comhttp://github.com/carleen • (+66) 094-762-7778

##SUMMARY With four years’ experience in laboratory research, I am a passionate experimental physicist with strong analytical skills. My work includes the fields of fluid dynamics, chaos theory, and astrophysics. I am accustomed to various group dynamics, working under supervision, and managing projects independently. I aim to apply my skills, knowledge, and previous work experience to a high-energy work environment.

##WORK EXPERIENCE

@d2s
d2s / installing-node-with-nvm.md
Last active Jul 26, 2021
Installing Node.js to Linux & macOS & WSL with nvm
View installing-node-with-nvm.md

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
@DavidWells
DavidWells / webpack-cssloader-keyframes-example
Created Sep 25, 2015
Example of how to use keyframes in webpack with css-loader + postcss
View webpack-cssloader-keyframes-example
:global {
.test {
position: absolute;
width:30px;
height:30px;
background: red;
display: block;
left:0px;
&:hover{
transform: rotateY(0deg);
@Gattermeier
Gattermeier / config.js
Last active Oct 3, 2017
NODE ENV config
View config.js
// var config = require('./config.js').get(process.env.NODE_ENV);
var config = {
production: {
session: {
key: 'the.express.session.id',
secret: 'something.super.secret'
},
database: 'mongodb://<user>:<pwd>@apollo.modulusmongo.net:27017/db',
twitter: {
@magician11
magician11 / reorder-button.html
Last active Jun 30, 2021
How to create a reorder button in Shopify's Liquid
View reorder-button.html
{% for order in customer.orders %}
{% assign reorder_url = "" %}
{% for line_item in order.line_items %}
{% capture reorder_url %}{{ reorder_url | append: line_item.variant_id | append: ':' | append: line_item.quantity | append: ',' }}{% endcapture %}
{% endfor %}
<a href="{{ '/cart/' | append: reorder_url }}" class="button tiny">reorder</a>
{% endfor %}
View ngrok-installation.md

Installing ngrok on OSX

For Homebrew v2.6.x and below:

brew cask install ngrok

For Homebrew v2.7.x and above: