Skip to content

Instantly share code, notes, and snippets.

View mikedatsko's full-sized avatar

Mykhailo Datsko mikedatsko

View GitHub Profile
@mikedatsko
mikedatsko / Readme.txt
Created January 31, 2023 23:34 — forked from jcward/Readme.txt
Generating iOS P12 / certs without Mac OSX Keychain (on linux, windows, etc)
1) Generate a private key and certificate signing request:
openssl genrsa -out ios_distribution.key 2048
openssl req -new -key ios_distribution.key -out ios_distribution.csr -subj '/[email protected], CN=Example, C=US'
2) Upload CSR to apple at: https://developer.apple.com/account/ios/certificate/create
- choose Production -> App Store and Ad Hoc
3) Download the resulting ios_distribution.cer, and convert it to .pem format:
#!/usr/bin/env bash
echo '== Creating application user and db'
mongo ${APP_MONGO_DB} \
--host localhost \
--port ${MONGO_PORT} \
-u ${MONGO_ROOT_USER} \
-p ${MONGO_ROOT_PASS} \
--authenticationDatabase admin \
@mikedatsko
mikedatsko / nginx.conf
Created October 9, 2019 00:07 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@mikedatsko
mikedatsko / mongodb-s3-backup.sh
Created April 16, 2019 05:27 — forked from eladnava/mongodb-s3-backup.sh
Automatically backup a MongoDB database to S3 using mongodump, tar, and awscli (Ubuntu 14.04 LTS)
#!/bin/sh
# Make sure to:
# 1) Name this file `backup.sh` and place it in /home/ubuntu
# 2) Run sudo apt-get install awscli to install the AWSCLI
# 3) Run aws configure (enter s3-authorized IAM user and specify region)
# 4) Fill in DB host + name
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket)
# 6) Run chmod +x backup.sh
# 7) Test it out via ./backup.sh
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
slogan: string = '';
slogans: string[] = ['Hello', 'World'];
@mikedatsko
mikedatsko / proxy_nginx.sh
Created April 22, 2018 09:57 — forked from rdegges/proxy_nginx.sh
Create a HTTP proxy for jenkins using NGINX.
sudo aptitude -y install nginx
cd /etc/nginx/sites-available
sudo rm default
sudo cat > jenkins
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
#!/usr/bin/env bash
search_dir="../Pictures/untitled_folder"
for file in "$search_dir"/*
do
date_transfer=$(stat -f '%Sm' "$file")
filename=$(basename "$file")
extension="${filename##*.}"
new_name="$(date -j -f '%b %d %T %Y' "$date_transfer" '+%Y-%m-%d %H.%M.%S').$extension"
@mikedatsko
mikedatsko / comparing-git-add-all.md
Created December 19, 2017 13:30 — forked from dsernst/comparing-git-add-all.md
Compare `git add .` vs `git add -A`

git add . vs git add -A

Both of these will stage all files, including new files (which git commit -a misses) and deleted files.

The difference is that git add -A also stages files in higher directories that still belong to the same git repository. Here's an example:

/my-repo
  .git/
 subfolder/
@mikedatsko
mikedatsko / gist:25e80dfa4be47e4589a52714011774ee
Created September 25, 2017 09:13 — forked from alimd/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | πŸ˜„ | πŸ˜† | 😊 | πŸ˜ƒ | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | πŸ˜† | 😁 | πŸ˜‰ | :wink2: | πŸ‘… | πŸ˜’ | πŸ˜… | πŸ˜“

😩 | πŸ˜” | 😞 | πŸ˜– | 😨 | 😰 | 😣 | 😒 | 😭 | πŸ˜‚ | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😑 | 😀 | πŸ˜ͺ | πŸ˜‹ | 😷

😎 | 😡 | πŸ‘Ώ | 😈 | 😐 | 😢 | πŸ˜‡ | πŸ‘½ | πŸ’› | πŸ’™ | πŸ’œ | ❀️ | πŸ’š | πŸ’” | πŸ’“ | πŸ’— | πŸ’• | πŸ’ž | πŸ’˜ | ✨

@mikedatsko
mikedatsko / export-gh-issues.sh
Created September 19, 2017 20:47 — forked from toashd/export-gh-issues.sh
Export github issues to json
curl -u ':uname' 'https://api.github.com/repos/:org/:repo/issues' > issues.json