Skip to content

Instantly share code, notes, and snippets.

@wenrg
wenrg / bash.generate.random.alphanumeric.string.sh
Created October 30, 2017 20:35 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@wenrg
wenrg / spider.py
Created November 20, 2016 03:21
Web Scraping - Ted.com
# -*- coding: utf-8 -*-
import scrapy
from ted.items import TedItem
# class TedtalkSpider(scrapy.Spider):
class TedSpider(scrapy.Spider):
name = 'tedspider'
allowed_domains = ["ted.com"]
start_urls = [
@wenrg
wenrg / global.R
Created November 2, 2016 03:51
Blog_Shiny_App
# library packages
library(shiny)
library(shinythemes)
library(ggplot2)
library(ggthemes)
library(dplyr)
library(xts)
library(dygraphs)
library(leaflet)
library(RColorBrewer)
@wenrg
wenrg / Blog_Health_Insurance.R
Last active November 20, 2016 03:23
Project 1 Health Insurance R code
######## library ########
library(ggplot2)
library(ggthemes)
library(dplyr)
library(RColorBrewer)
library(googleVis)
library(reshape2)
######## loading data ########