List all node_modules and the cumulative size (Mac OS / Linux)
find . -name "node_modules" -type d -prune | xargs du -chs
Destroy all
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
#!/bin/ruby | |
require "benchmark" | |
iterations = 100_000 | |
Benchmark.bm do |bm| | |
bm.report do | |
iterations.times do | |
(1..100).each{|i| (str = (i%3!=0 ? '':"Fizz")+(i%5!=0 ? '':"Buzz")).empty? ? i : str} | |
end |
# Watermarking image with another image using Imagemagick 'composite', 'watermark' and 'dissolve'. | |
require "rubygems" | |
require "RMagick" | |
require "pry" | |
include Magick | |
# Read the image in the memory with RMagick | |
puts "What is the image file you want to watermark?" | |
puts "Drag and drop the file here or enter the full path to the image" | |
path = gets.chomp |
#!/usr/bin/env ruby | |
require 'mechanize' | |
require 'csv' | |
tickers = ["EWX","EZM","FMIJX","IGM","IGV","ITOT","POGRX","PRHSX","SCZ","SPEM","SPVU","SYE","VEA","XSLV","TRBIX","VEMIX","VIIIX","VWILX","VSCIX"] | |
mechanize = Mechanize.new | |
puts "Creating new CSV" |
CAN 0 | |
0414(1044)( 24) 0000000000001700 | |
0420(1056)( 145) 0002000cfbfc0031 | |
0423(1059)( 142) 00 | |
0427(1063)( 145) 0000000000000000 | |
042F(1071)( 143) 0000000000000000 | |
0435(1077)( 144) 850505ffe00f0003 | |
045A(1114)( 142) 5a04006400000000 | |
0489(1161)( 23) 0000000000000004 |
############################################################################## | |
# Copyright 2019 SoundHound, Incorporated. All rights reserved. | |
############################################################################## | |
import base64 | |
import hashlib | |
import hmac | |
import http.client | |
import json | |
import threading | |
import time |
# Setup linux packages | |
option_settings: | |
- option_name: BUNDLE_DISABLE_SHARED_GEMS | |
value: "1" | |
- option_name: BUNDLE_PATH | |
value: "vendor/bundle" | |
packages: | |
yum: | |
curl: [] |
# Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too. | |
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready! | |
Resources: | |
sslSecurityGroupIngress: | |
Type: AWS::EC2::SecurityGroupIngress | |
Properties: | |
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]} | |
IpProtocol: tcp | |
ToPort: 443 |
commands: | |
01_get_nginx_conf_file: | |
command: aws s3 cp s3://your-bucket-name/shared_config/an_nginx_http.conf /home/ec2-user | |
container_commands: | |
01_move_nginx_conf_file: | |
command: mv -f /home/ec2-user/an_nginx_http.conf /etc/nginx/conf.d/an_nginx_http.conf | |
02_reload_nginx: | |
command: "sudo service nginx reload" |
List all node_modules and the cumulative size (Mac OS / Linux)
find . -name "node_modules" -type d -prune | xargs du -chs
Destroy all
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +