Skip to content

Instantly share code, notes, and snippets.

View stewones's full-sized avatar
🐠
Cooking something new.

Stewan stewones

🐠
Cooking something new.
View GitHub Profile
@taxilian
taxilian / README.md
Created November 9, 2019 22:13
Mongodb scripts for incremental backup

Introduction

I can't take credit for much of the work here -- I adapted it from this blog post: https://tech.willhaben.at/mongodb-incremental-backups-dff4c8f54d58

My main contribution was to make it a little easier to use with docker as well as numerous little cleanup tasks. I also made it gzip the oplog backups and added support for SSL connections

Note that I havne't yet tested the point in time restore script; it likely needs work, particularly to make things work with the gzipped oplog files

@estorgio
estorgio / prettier-eslint-precommit.md
Last active August 11, 2024 22:13
Setting up Prettier and ESLint with pre-commit hook

Setting up Prettier and ESLint with pre-commit hook

  • Initialize Git repository
    git init
  • Create .gitignore file and add the following:
    node_modules/
    *.env
    
@mkamakura
mkamakura / firebase.json
Created December 17, 2017 03:35
[Firebase Hosting,Functions] basic認証付きでサイトを公開する
{
"hosting": {
"public": "public",
"rewrites": [
{
"source": "**",
"function": "app"
}
],
"redirects": [{
import Foundation
import Photos
typealias AssetID = String
class ImageUtil {
static var defaultAlbumName = "App Name"
static var videosAlbumName = "App Name Videos"
@kinoli
kinoli / autoresize.ts
Created September 13, 2017 22:14
Auto resize directive for TextAreas in Angular 2/4
// An autoresize directive that works with ion-textarea in Ionic 2
// Usage example: <ion-textarea autoresize [(ngModel)]="body"></ion-textarea>
// Usage example: <ion-textarea autoresize="100" [(ngModel)]="body"></ion-textarea>
// Based on https://www.npmjs.com/package/angular2-autosize
import { Directive, HostListener, ElementRef, Input } from "@angular/core";
@Directive({
selector: "ion-textarea[autoresize]" // Attribute selector
})
::-webkit-scrollbar {
height: 16px;
overflow: visible;
width: 12px;
}
::-webkit-scrollbar-button {
height: 0;
width: 0;
}
$breakpoint-alpha: 800px;
.table-search {
display: flex;
padding: 1.3em 1.6em;
input {
font-size: 14px;
flex: 1 1 100%;
box-sizing: border-box;
-webkit-box-flex: 1;
border: none;
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active November 11, 2024 14:18
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

storeFile=/path/to/key
keyAlias={key-alias}
storePassword={store-pass}
keyPassword={key-pass}
@bgromov
bgromov / git-reset-author.sh
Created June 23, 2016 17:50
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD