Skip to content

Instantly share code, notes, and snippets.

@adamamyl
adamamyl / samba_backup.sh
Created November 5, 2018 10:43 — forked from muyesh/samba_backup.sh
samba_backup script for Ubuntu 14.04
#!/bin/sh
#
# Copyright (C) Matthieu Patou <mat@matws.net> 2010-2011
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
May-06 20
Jun-06 18
Jul-06 9
Aug-06 28
Sep-06 43
Oct-06 14
Nov-06 22
Dec-06 14
Jan-07 29
Feb-07 39
#!/bin/bash
#
# allow-ssh-host:
#
# Copyright (c) 2016 root. All rights reserved.
#
#
# $Id:$
#
@adamamyl
adamamyl / crontab
Last active August 29, 2015 14:16 — forked from rcook/LICENSE
#!/bin/sh
#
# Provides missing crontab editing
# Note: Synology crond requires arguments separated by a TAB character
# and the crontab user field only supports root. These requirements are
# enforced by this script.
#
# John Kelly, 2013-05-03
# Richard Cook, 2014-02-21
#
#!/bin/bash
if [ -z "$1" ]; then
echo "";echo "[i] Usage: `basename $0` http://www.slideshare.net/link_with_presentation";echo "";exit
fi
presentation=`curl -s --user-agent 'Mozilla/5.0' "$1" | tr '"' "\n" | egrep -m 1 -e "static\.slidesharecdn\.com\/swf\/ssplayer2\.swf\?doc=(.*?)\{rel}{startSlide}" | cut -d '{' -f 1 | cut -d '=' -f 2`
pages=`curl -s --user-agent 'Mozilla/5.0' "$1" | grep -m 1 "slideshare_object" | sed 's/.*total_slides":\([^,]*\).*/\1/'`
version=`curl -s --user-agent 'Mozilla/5.0' "$1" | grep -m 1 "slideshare_object" | sed 's/.*version_no":"\([^""]*\).*/\1/'`
workdir=~/tmp/${RANDOM}${RANDOM}
require 'octokit'
require 'csv'
require 'date'
# Github credentials to access your private project
USERNAME="USER_NAME"
PASSWORD="SEKRIT"
# Project you want to export issues from
USER="REPO_OWNER"
PROJECT="REPO_NAME"
After spending the better part of the month implementing date support
in RethinkDB, Mike Lucy sent the team the following e-mail. It would
have been funny, if it didn't cause thousands of programmers so much
pain. Read it, laugh, and weep!
-----
So, it turns out that we're only going to support dates between the
year 1400 and the year 10000 (inclusive), because that's what boost
supports.
@adamamyl
adamamyl / README
Last active December 12, 2015 08:48 — forked from nertzy/README
These two files should help you to import passwords from mac OS X keychains to 1password.
Assumptions:
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they
#!/bin/bash
#
# nginx-installer:
# Install nginx.
#
# Forked from -- Author : Scott Barr
#
# $Id:$
set -e