Skip to content

Instantly share code, notes, and snippets.

View valdero's full-sized avatar

Valentin Abramenkov valdero

View GitHub Profile
@valdero
valdero / aws-s3-find-by-date.sh
Created January 9, 2019 08:12
AWS S3 - find files based on date
#!/bin/bash
DATE=$(date +%Y-%m-%d)
aws s3 ls s3://bucket.example.com/somefolder/ --exclude "" --include "${DATE}*"
@valdero
valdero / ..git-pr.md
Created June 14, 2018 05:26 — forked from gnarf/..git-pr.md
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
  • SPA-example of project with:
    • React
    • Redux
    • react-router
    • Less

  • src
  • fonts
@valdero
valdero / init.coffee
Created May 25, 2016 17:42
Enabling Atom welcome screen on each startup
# Show welcome screen on each startup
atom.config.set 'welcome.showOnStartup', true
/*
Storing Ajax response in array for reuse
*/
var ajaxResults = [];
function exampleAjaxCall() {
$('body').on('click', '.loader', function (e) {
var id = $(this).attr('pid');
var data = {
/*
Creating an asynchronous promise object by:
-Creating a wrapper object with a method for an API call (multiple methods for chaining).
-Specifying a then method to return a promise object.
*/
var query = 'url';
var exampleObject = {
html : function() {