Skip to content

Instantly share code, notes, and snippets.

View scristian's full-sized avatar
💭
I may be slow to respond.

Cristian Spoiala scristian

💭
I may be slow to respond.
View GitHub Profile
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@mariuz
mariuz / curl_mail_cron.php
Created February 7, 2012 16:42
create a crontab script that runs at specific hour save the output in a file folder (the url must use a sumbit button with post) send email with the html file
#!/usr/bin/php
<?php
include 'Mail.php';
include 'Mail/mime.php' ;
$url = 'https://www.google.com/search?hl=en&gl=us&tbm=nws&btnmeta_news_search=1&q=android&oq=android';
$emails = 'example@example.com';
$path = '/home/ubuntu/';
$today = getdate();
$day= $today["mday"];
$month= $today["mon"];