Skip to content

Instantly share code, notes, and snippets.

View ixti's full-sized avatar
😂
forever blowing bubbles

Alexey Zapparov ixti

😂
forever blowing bubbles
View GitHub Profile
# coding: utf-8
#
# Copyright (c) 2013 Aleksey V Zapparov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@ixti
ixti / _variables.scss
Created November 25, 2013 18:43
[jekyll-assets] Sprockets require example (see https://github.com/ixti/jekyll-assets/issues/63)
$main: "black";
$main: "black";
require "socket"
class Socket
# ruby < v 2.0.0-p195
SO_REUSEPORT = 15 unless const_defined? :SO_REUSEPORT
end
sock = Socket.new Socket::AF_INET, Socket::SOCK_STREAM
startup_message off
hardstatus alwayslastline '%{= G}[ %{G}%H %{g}][%= %{= w}%?%-Lw%?%{= R}%n*%f %t%?%{= R}(%u)%?%{= w}%+Lw%?%= %{= g}][ %{y}Load: %l %{g}][%{B}%Y-%m-%d %{W}%c:%s %{g}]'
@ixti
ixti / show-indexes.js
Last active October 10, 2024 04:03
Small script that extracts all non-default indexes from MongoDB
rs.slaveOk();
db.getCollectionNames().forEach(function(coll) {
db[coll].getIndexes().forEach(function(index) {
if ("_id_" !== index.name) {
print("db." + coll + ".ensureIndex(" + tojson(index.key) + ")");
}
});
});
@ixti
ixti / oc-conflicts-cleanup.sh
Created April 6, 2013 21:59
ownCloud conflict files cleaner.
#!/bin/sh
find_conflicts() {
PATTERN='.*_conflict-[0-9]{8}-[0-9]{6}.[a-z]{3,4}'
find ${DATA:-"."} -type f -regextype posix-egrep -iregex $PATTERN
}
CONFLICTS_COUNT=$(find_conflicts | wc -l)
@ixti
ixti / app.css.sass
Created January 7, 2013 18:10
Example of using jekyll-assets + compass + susy
@import "susy"
.page { @include container; }
@ixti
ixti / 00-unstable-before.log
Created February 7, 2012 23:24
mem consumption redis 2.4.7 vs unstable (https://github.com/ixti/nohm-redis-test)
# Server
redis_version:2.9.3
redis_git_sha1:01e95705
redis_git_dirty:0
arch_bits:64
multiplexing_api:epoll
gcc_version:4.6.2
process_id:1311
tcp_port:6379
uptime_in_seconds:149
@ixti
ixti / scrollhead.js
Created October 21, 2011 14:24
jQuery ScrollHead draft
/*!
* jQuery ScrollHead v.0.0.1
*
* Copyright (C) 2011 Vitaly Puzrin <http://www.rcdesign.ru/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is