chmod +x <path/to/movie2mp4.sh>
ln -s <path/to/movie2mp4.sh> /usr/local/bin/movie2mp4
server { | |
listen 80; | |
listen 443 ssl; | |
server_name servername.domain; | |
ssl on; | |
ssl_certificate /etc/apache2/ssl/apache.crt; | |
ssl_certificate_key /etc/apache2/ssl/apache.key; | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv2 SSLv3 TLSv1; |
##0. Mass Assignment
Mass assignment allows us to set a bunch of attributes at once:
attrs = { :first => "John", :last => "Doe",
:email => "john.doe@example.com"}
user = User.new(attrs)
#!/usr/bin/env ruby | |
require "optparse" | |
require "fileutils" | |
options = {} | |
current_work_dir = ::File.expand_path(::File.dirname(__FILE__)) | |
current_date_time = Time.now.strftime("%Y%m%d-%H%M") | |
OptionParser.new do |opts| |
When you have multiple branches need to rebase with same a branch. You need to switch to each branch and rebase it. This script help you to automate switch and rebase with each branch with main branch (auto get or you can passing it into first argument)
./git-bulk-rebase.sh <main branch>
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
"""Update SSH config file from AutoScaling groups | |
Author: NamNV609 | |
Copyright: 2022, NamNV609 | |
Homepage: https://github.com/namnv609 | |
""" |
#!/usr/bin/env python | |
import argparse, getpass | |
class Password(argparse.Action): | |
def __call__(self, parser, namespace, values, option_string): | |
if values is None: | |
values = getpass.getpass() | |
setattr(namespace, self.dest, values) |
class LunarDate { | |
final int year; | |
final int month; | |
final int day; | |
final int leapMonth; | |
final bool isLeapYear; | |
/// Constructs a [LunarDate] instance. | |
LunarDate(this.year, this.month, this.day, [this.isLeapYear = false, this.leapMonth = 0]); |
users_data = [{ | |
"id": "7c5dae5552338874e5053f2534d2767a", | |
"email": "user@example.com", | |
"first_name": "John", | |
"last_name": "Appleseed", | |
"username": "cfuser12345", | |
"telephone": "+1 123-123-1234", | |
"country": "US", | |
"zipcode": "12345", | |
"created_on": "2014-01-01T05:20:00Z", |