Skip to content

Instantly share code, notes, and snippets.

🔳
ᕕ( ᐛ )ᕗ

Mateusz Charytoniuk mcharytoniuk

🔳
ᕕ( ᐛ )ᕗ
Block or report user

Report or block mcharytoniuk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mcharytoniuk
mcharytoniuk / git-find-file-in-revision.sh
Last active Dec 12, 2015
find file in any git revision
View git-find-file-in-revision.sh
#!/usr/bin/env bash
PHRASE=$1;
for rev in $(git rev-list --all); do
if [ -n "`( git ls-tree --full-tree -r $rev; ) | grep $PHRASE`" ]; then
echo "`git branch --contains $rev | grep '*' | tr -d [:space:] | tr -d [=*=];`:$rev:`git ls-tree --full-tree -r $rev | grep $PHRASE`";
fi
done
View polymer-google-maps.html
<link rel="import" href="../bower_components/polymer/polymer.html" />
<link rel="import" href="../bower_components/google-apis/google-apis.html" />
<polymer-element attributes="lat lng" name="gmaps-google-map-marker">
<template>
<content id="marker" select="a"></content>
</template>
<script>
"use strict";
View esprima-requirejs-parser.js
"use strict";
var _ = require("lodash"),
esprima = require("esprima-fb"),
fs = require("fs"),
glob = require("glob");
function collectModuleNameFromArrayExpression(file, arrayExpression, modules) {
if (!arrayExpression.elements) {
return;
View atom-config.cson
"*":
core:
disabledPackages: [
"language-javascript"
]
themes: [
"one-dark-ui"
"base16-tomorrow-dark-theme"
]
editor:
@mcharytoniuk
mcharytoniuk / Vagrantfile
Last active Jan 24, 2019
Vagrant + docker-compose
View Vagrantfile
Vagrant.configure(2) do |config|
config.vm.box = "phusion/ubuntu-14.04-amd64"
config.vm.network "forwarded_port", guest: 3306, host: 3306
# If errors occur, try running "vagrant provision" manually
# after "vagrant up"
config.vm.provision :docker
# To use docker_compose as a provisioning tool, install
# vagrant-docker-compose plugin first. It should also solve the
View MC.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlueColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECYw
LjI1MDk4MDQwNyAwLjQ3NDUwOTgzNTIgMC42OTQxMTc2NjUzABACgALSEBESE1okY2xh
c3NuYW1lWCRjbGFzc2VzV05TQ29sb3KiEhRYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2
@mcharytoniuk
mcharytoniuk / filename2md5.sh
Created Jan 19, 2018
replace filenames with file's md5 sum
View filename2md5.sh
ls -1 -A | while IFS= read FILE; do
EXTNAME=`echo $FILE | rev | cut -f 1 -d '.' | rev`;
# https://stackoverflow.com/questions/3679296/only-get-hash-value-using-md5sum-without-filename
NEWNAME=`md5sum "$FILE" | awk '{ print $1 }'`\.$EXTNAME;
mv "$FILE" $NEWNAME;
done
View sublime-settings.json
{
"always_show_minimap_viewport": true,
"animation_enabled": false,
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"default_line_ending": "unix",
"draw_centered": true,
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".git",
View slick-slider-minimal.scss
/* Slider */
.foo-slider
{
opacity: 0;
// overflow: hidden;
transition: opacity 0.3s ease-in-out;
}
.foo-slider.slick-slider
You can’t perform that action at this time.