Skip to content

Instantly share code, notes, and snippets.

View EmilVarona's full-sized avatar

Emil Varona EmilVarona

  • evarona
View GitHub Profile
@EmilVarona
EmilVarona / curl.md
Created May 12, 2018 00:51 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@EmilVarona
EmilVarona / gitCommitReport.sh
Created May 8, 2018 21:54
Last 3 months of commits to master branch in CSV
#!/bin/bash
# output last 3 months of commits to CSV file
echo '"CommitHash","Author","Date","CommittComment"'> ~/gitMasterCommits.csv && \
git log --since='last 3 months' --first-parent master --pretty=format:'"%h","%an","%ad","%s"' >> ~/gitMasterCommits.csv && \
open ~/Desktop/ImplMasterCommits.csv
@EmilVarona
EmilVarona / alarmClock.sh
Last active May 3, 2018 00:00
bash alarm clock
#!/bin/bash
# "say" command is used on Mac OS X. Chose your own alert mechanism.
# FYI: my system is using military time
while [[ $(date "+%H%M") -lt 1650 ]]; do
printf '%s' "." #optional, for visual tracking
sleep 10
done && say "done, mother fucker, I am done"
// MFA policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllUsersToListAccounts",
"Effect": "Allow",
"Action": [
"iam:ListAccountAliases",
"iam:ListUsers",
@EmilVarona
EmilVarona / gist:78ae2aff409922686ebff4cea785aed4
Created April 13, 2017 01:28
Outlook/Mac 2015 raw query item names
<?xml version="1.0" encoding="UTF-8"?>
<schema version="1.0" xmlns="http://www.apple.com/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.apple.com/metadata file:///System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Resources/MetadataSchema.xsd">
<!--
Compiled from /Applications/Microsoft\ Outlook.app/Contents/Library/Spotlight/Microsoft\ Outlook\ Spotlight\ Importer.mdimporter/Contents/Resources/schema.xml
with info from http://xensoft.com/search-mac-outlook-2011-mail-with-raw-queries/
-->
<types>
<type name="com.microsoft.outlook15.contact">
<allattrs>
kMDItemTitle
@EmilVarona
EmilVarona / Addcrontab.sh
Created August 27, 2016 07:34
add line to user crontab by script
#!/bin/bash
if [[ -z $1 ]]; then
echo ERROR: no target user ID given'
exit 1
else
someUser=$1
fi
sudo /bin/bash -c "echo \*/2 \* \* \* \* /my/command >> /var/spool/cron/${someUser}"