Skip to content

Instantly share code, notes, and snippets.

Avatar

Emil Varona EmilVarona

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

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
Last 3 months of commits to master branch in CSV
View gitCommitReport.sh
#!/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
bash alarm clock
View alarmClock.sh
#!/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"
View gist:638e49fd77a621ab32c28cff31fa7fc4
// MFA policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllUsersToListAccounts",
"Effect": "Allow",
"Action": [
"iam:ListAccountAliases",
"iam:ListUsers",
@EmilVarona
EmilVarona / gist:78ae2aff409922686ebff4cea785aed4
Created Apr 13, 2017
Outlook/Mac 2015 raw query item names
View gist:78ae2aff409922686ebff4cea785aed4
<?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 Aug 27, 2016
add line to user crontab by script
View Addcrontab.sh
#!/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}"
You can’t perform that action at this time.