Skip to content

Instantly share code, notes, and snippets.

View seomago's full-sized avatar
:octocat:
Playing with AWS cloud

seomago seomago

:octocat:
Playing with AWS cloud
View GitHub Profile
#!/bin/sh
# script to change the sleep mode of an OS X machine
usage () {
echo "supported sleep modes:"
echo " sleep"
echo " safesleep"
echo " hibernate"
echo " secure"
echo " insecure"
@renoirb
renoirb / README.md
Last active May 3, 2023 13:44
I created this migration script in 2010 while I had to transfer a quantity of websites.
@gitaarik
gitaarik / git_submodules.md
Last active March 6, 2025 13:49
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@asmacdo
asmacdo / main.yml
Created August 1, 2014 14:47
Create multiple directories with ansible
- name: Make sure the sites-available, sites-enabled and conf.d directories exist
file:
path: "{{nginx_dir}}/{{item}}"
owner: root
group: root
mode: 0755
recurse: yes
state: directory
with_items: ["sites-available", "sites-enabled", "conf.d"]
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active March 7, 2025 22:45
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@frntn
frntn / gist:f25726df962fc29c6dde
Last active July 14, 2024 15:15
azure-cli cheatsheet
azure
account
list [options] #List the imported subscriptions
show [options] [subscriptionNameOrId] #Show details about a subscription
set [options] <subscriptionNameOrId> #Set the current subscription
clear [options] #Remove a subscription or environment, or clear all of the stored account and environment info
import [options] <file> #Import a publishsettings file or certificate for your account
download [options] #Launch a browser to download your publishsettings file
env... #Commands to manage your account environment
@dflock
dflock / README.md
Last active April 9, 2019 10:57
Docker bash aliases.

docker_aliases

Docker bash aliases - new bash shell commands to make working with Docker containers & images easier.

Installation

Save the docker_aliases.sh file to your home directory. Rename it to .docker_aliases and add this to your ~/.bashrc file somewhere:

if [ -f ~/.docker_aliases ]; then
@vancluever
vancluever / amifind.sh
Created January 26, 2016 08:05
Find the most recent Ubuntu AMI using aws-cli (or any other AMI for that matter)
#!/bin/sh
# Use AWS CLI to get the most recent version of an AMI that
# matches certain criteria. Has obvious uses. Made possible via
# --query, --output text, and the fact that RFC3339 datetime
# fields are easily sortable.
export AWS_DEFAULT_REGION=us-east-1
aws ec2 describe-images \
@leonardofed
leonardofed / README.md
Last active March 8, 2025 16:47
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active December 25, 2024 09:50
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}