Skip to content

Instantly share code, notes, and snippets.

View mryap's full-sized avatar
💭
Seeking full-time employment

Mr. Yap mryap

💭
Seeking full-time employment
  • 01:58 (UTC +01:00)
View GitHub Profile
@rich-iannone
rich-iannone / iris_plot_DiagrammeR.R
Last active February 11, 2016 01:36
How to plot some Iris data with DiagrammeR and export as a PDF or PNG.
devtools::install_github("rich-iannone/DiagrammeR")
library(DiagrammeR)
library(DiagrammeRsvg)
library(magrittr)
# Create three groups (Setosa, Versicolor, and Virginica)
# of x,y datapoints for petal length (x) and petal width (y)
setosa <-
create_xy_pts(
series_label = "Setosa",
@TravelingTechGuy
TravelingTechGuy / get_history.sh
Created May 9, 2016 14:10
Get your Chrome history as a CSV file
#!/bin/bash
# Locate the history file in your profile, and copy it to the same folder as this script.
# On Mac: ~/Library/Application\ Support/Google/Chrome/Default/History
# On Windows: C:\Users\YOUR USER NAME\AppData\Local\Google\Chrome\User Data\Default\History
sqlite3 History <<!
.headers on
.mode csv
.output out.csv
@mattes
mattes / og.txt
Last active May 7, 2022 01:53
Open Graph debugger
http://ogp.me/
https://moz.com/blog/meta-data-templates-123
https://search.google.com/structured-data/testing-tool
https://developers.facebook.com/tools/debug/og/object - https://developers.facebook.com/docs/reference/opengraph
https://cards-dev.twitter.com/validator - https://dev.twitter.com/cards/types
https://developers.pinterest.com/tools/url-debugger/ - https://developers.pinterest.com/docs/rich-pins/overview/
https://developer.linkedin.com/docs/share-on-linkedin
@mattstratton
mattstratton / README.md
Last active April 24, 2018 00:22
Docker For DevOpsDays.org

The shell script (hugoserver.sh) currently runs. The PowerShell script (hugoserver.ps1) is throwing errors, as displayed in the output.log in this gist.

To test, run git clone git@github.com:devopsdays/devopsdays-web.git and then run one of the above scripts in the cloned directory (note: the hugoserver.sh script is already part of the directory; the PowerShell script is not).

The result should look like this, if it works:

 ~/src/devopsdays-web/ [master*] ./hugoserver.sh
hugo-server
hugo-server
@g0t4
g0t4 / Notes.md
Last active November 4, 2024 06:15
Getting Started with Docker on Windows
@napsternxg
napsternxg / GDELT+Analysis.ipynb
Created March 7, 2017 00:14
Collect and analyze GDELT events between a source country and all target countries across years using BigQuery
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simecek
simecek / rmagic_example.ipynb
Last active January 16, 2021 13:29
How to add R code to your (IPython) Jupyter Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# data from http://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/population-distribution-demography/geostat
# Originally seen at http://spatial.ly/2014/08/population-lines/
# So, this blew up on both Reddit and Twitter. Two bugs fixed (southern Spain was a mess,
# and some countries where missing -- measure twice, submit once, damnit), and two silly superflous lines removed after
# @hadleywickham pointed that out. Also, switched from geom_segment to geom_line.
# The result of the code below can be seen at http://imgur.com/ob8c8ph
library(tidyverse)
@psychemedia
psychemedia / SimpleAPI.ipynb
Created September 6, 2017 16:27
Demo of a simple API defining Jupyter notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.