Skip to content

Instantly share code, notes, and snippets.

View usirin's full-sized avatar

Umut Sirin usirin

View GitHub Profile
#!/bin/bash
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`
@usirin
usirin / delete_all_object_versions.sh
Created May 10, 2018 02:13 — forked from weavenet/delete_all_object_versions.sh
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
#!/bin/bash
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`
@usirin
usirin / atom-snippets.cson
Created January 5, 2018 01:08
Atom snippets
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
@usirin
usirin / semantic-theme.js
Created October 5, 2017 17:52
Semantic variables as a js object
import * as polished from 'polished'
import range from 'lodash.range'
const unit = (value, type) => `${value}${type}`
const relative = value => unit(value, 'em')
const absolute = value => unit(value, 'rem')
const lighten = (val, percent) => polished.lighten(percent / 100, val)
const darken = (val, percent) => polished.darken(percent / 100, val)
const saturate = (val, percent) => polished.saturate(percent / 100, val)
const rgba = (r, g, b, a) => `rgba(${r}, ${g}, ${b}, ${a})`
javascript: var v = document.querySelector('video'); var t = prompt('Set the playback rate'); v.playbackRate = parseFloat(t)
@usirin
usirin / atom-keybinding.cson
Created March 23, 2017 17:23
Atom keybindings
# normal mode
'atom-text-editor.vim-mode-plus.normal-mode':
', a': 'editor:toggle-line-comments'
', e v': 'settings-view:install-packager-and-theme'
':': 'vim-mode-plus-ex-mode:open'
';': 'vim-mode-plus-ex-mode:open'
'!': 'vim-mode-plus-ex-mode:toggle-setting'
'g f': 'open-this:here'
package myHashTable;
import java.util.Arrays;
public class assignment {
public static void main(String[] args) {
// keys to add
int[] keys = {517, 492, 27, 116, 132, 30, 552, 725, 627, 192};
System.out.println("Keys to Add: " + Arrays.toString(keys));
// HASH TABLE PROPERTIES
@usirin
usirin / myHash.java
Last active December 31, 2016 13:53 — forked from anonymous/myHash
HashTable implementation
package myHashTable;
import java.util.Arrays;
public class myHash {
private int capacity;
private double max_load_factor;
private int resize_factor = 2;
private int search_limit = 0;
private int probing_type;
@usirin
usirin / increase-video-speed.js
Created September 30, 2016 18:25
Bookmarklets
javascript: var v = document.querySelector('video'); var t = prompt('Set the playback rate'); v.playbackRate = parseFloat(t)