View gist:9303af1e8f25e3b2ee9d96c9df29fd25
curl -H "Content-Type:application/json" -X POST http://localhost:5984/$DB/_view_cleanup | |
curl -H "Content-Type:application/json" -X POST https://localhost:5984/$DB/_compact | |
curl -H "Content-Type:application/json" -X POST https://localhost:5984/$DB/_compact |
View myProxy.pac
function FindProxyForURL(url, host) { | |
return "SOCKS 192.168.1.4:1080"; | |
} |
View brctl_show.sh
brctl_showmacs () { | |
cat /sys/class/net/$1/brforward > /tmp/brforward ; | |
printf "port no\tmac addr\t\tis local?\tageing timer\n" ; | |
hexdump -v -e '5/1 "%02x:" /1 "%02x" /1 " %x" /1 " %x" 1/4 " %i" 1/4 "\n"' /tmp/brforward | awk '{ islocal = $3 ? "yes" : "no" ; printf "%3i\t%s\t%s\t\t%8.2f\n",$2,$1,islocal,$4/100 } ' ; | |
} |
View gist:f1dc322bfcc2f011077980e989d32f53
xcrun simctl delete unavailable |
View gitlab-runner
#!/bin/sh | |
# For RedHat and cousins: | |
# chkconfig: - 99 01 | |
# description: GitLab Runner | |
# processname: /usr/local/bin/gitlab-ci-multi-runner | |
### BEGIN INIT INFO | |
# Provides: /usr/local/bin/gitlab-ci-multi-runner | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog |
View fastDate.js
function fastDateFactory() { | |
var DAYS_IN_YEAR = 365; | |
var DAYS_IN_LEAP_YEAR = 366; | |
var DAYS_IN_4_YEARS = DAYS_IN_LEAP_YEAR + DAYS_IN_YEAR * 3; | |
var DAYS_IN_OTHER_FIRST_4_YEARS = DAYS_IN_YEAR * 4; | |
var DAYS_IN_FIRST_100_YEARS = DAYS_IN_4_YEARS * 25; | |
var DAYS_IN_NEXT_100_YEARS = DAYS_IN_OTHER_FIRST_4_YEARS + DAYS_IN_4_YEARS * 24; | |
var DAYS_IN_400_YEARS = DAYS_IN_FIRST_100_YEARS + DAYS_IN_NEXT_100_YEARS * 3; |
View portal.js
'use strict'; | |
angular | |
.module('portal', ['']) | |
.directive('portalIn', [function() { | |
return { | |
scope: { | |
key: '@', | |
portalContainer: '=' | |
}, |
View gist:c3df13c26f5cfd04bafd
//тесты для текущего(твоего) варианта директивы | |
describe('statsHeight', function() { | |
var $compile, | |
$rootScope, | |
$timeout; | |
beforeEach(function () { | |
angular.mock.module('gby.common'); | |
}); |