Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View FrancisVarga's full-sized avatar
🌴
On vacation

Francis Varga FrancisVarga

🌴
On vacation
  • Phili-Tech
  • Berlin, Germany
View GitHub Profile
// Generated on 2014-05-02 using generator-angular 0.8.0
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
@FrancisVarga
FrancisVarga / ReadMe.md
Last active December 17, 2015 06:29
Some monkey stuff

#Description:

  • svn update
  • restart your solr
  • run the schema-updater
  • worker
  • solr full import

So daily job's...

@FrancisVarga
FrancisVarga / my.cnf
Created May 2, 2013 13:15
mysql bullshit!
# Fine Tuning
max_allowed_packet = 20M
thread_stack = 192K
myisam-recover = BACKUP
max_connections = 2048
open_files_limit = 32768
# Buffers and Caches
table_cache = 8192
tmp_table_size = 256M
@FrancisVarga
FrancisVarga / sudokochecker.php
Created January 14, 2013 04:39
check 9 numbers
#!/usr/bin/env php -f
<?php
$sudoko [] = [1, 8, 2, 5, 4, 3, 6, 9, 7];
$sudoko [] = [9, 6, 5, 1, 7, 8, 3, 4, 2];
$sudoko [] = [7, 4, 3, 9, 6, 2, 8, 1, 5];
function isValidSudoko($sudoko)
{
@FrancisVarga
FrancisVarga / cbbackup.py
Created November 26, 2012 21:07
Python script dump http request, example with couchbase.
#!/usr/bin/env python
__author__ = 'Francis Varga'
import os
import urlopen
import argparse
import time
import sys
import tarfile
[{"name":"default","bucketType":"membase","authType":"sasl","saslPassword":"","proxyPort":0,"replicaIndex":true,"uri":"/pools/default/buckets/default?bucket_uuid=6e409a7ef16955e402ae2e17463600df","streamingUri":"/pools/default/bucketsStreaming/default?bucket_uuid=6e409a7ef16955e402ae2e17463600df","localRandomKeyUri":"/pools/default/buckets/default/localRandomKey","controllers":{"flush":"/pools/default/buckets/default/controller/doFlush","compactAll":"/pools/default/buckets/default/controller/compactBucket","compactDB":"/pools/default/buckets/default/controller/compactDatabases"},"nodes":[{"couchApiBase":"http://192.168.42.18:8092/default","systemStats":{"cpu_utilization_rate":1.492537313432836,"swap_total":8564764672,"swap_used":180625408},"interestingStats":{"couch_docs_actual_disk_size":1931665144,"couch_docs_data_size":1925173701,"couch_views_actual_disk_size":28112562325,"couch_views_data_size":234746230,"curr_items":2283525,"curr_items_tot":4567610,"mem_used":2984389016,"vb_replica_curr_items":2284085},"
@FrancisVarga
FrancisVarga / .profile
Last active October 12, 2015 20:17
my .profile stuff
# ---- crwd-tools ----
LANG="en_US.UTF-8"
export LANG
LC_ALL="en_US.UTF-8"
export LC_ALL
LC_CTYPE="UTF-8"
export LC_CTYPE
PATH=$HOME/bin:/usr/local/bin:/usr/local/sbin:$PATH
export PATH
@FrancisVarga
FrancisVarga / couchbase_backup_error.log
Created November 14, 2012 12:21
Backuping a cluster with 2 nodes.
francis-casino-cc:www hissterkiller$ /Applications/Couchbase\ Server.app/Contents/Resources/couchbase-core/bin/cbbackup -u Administrator -p Administrator -t 256 -v http://192.168.42.16:8091 /Users/hissterkiller/cbbackups
2012-11-14 12:57:52,610: mt cbbackup...
2012-11-14 12:57:52,610: mt source : http://192.168.42.16:8091
2012-11-14 12:57:52,610: mt sink : /Users/hissterkiller/cbbackups
2012-11-14 12:57:52,610: mt opts : {'username': '<xxx>', 'verbose': 1, 'dry_run': False, 'extra': {'max_retry': 10.0, 'nmv_retry': 1.0, 'cbb_max_mb': 100000.0, 'try_xwm': 1.0, 'batch_max_bytes': 400000.0, 'report_full': 2000.0, 'batch_max_size': 1000.0, 'report': 5.0, 'recv_min_bytes': 4096.0}, 'single_node': False, 'threads': 256, 'key': None, 'password': '<xxx>', 'id': None, 'bucket_source': None}
2012-11-14 12:57:52,638: mt bucket: default
[###### ] 29.7% (1357948/4567610 msgs)
2012-11-14 12:59:18,275: w1 progress...
2012-11-14 12:59:18,278: w1 source : http://192.168.42.16:8091(default@192.168.42.
@FrancisVarga
FrancisVarga / benchmark.php
Created October 26, 2012 00:19
Benchmark Couchbase-1723
<?php
/**
* Created by JetBrains PhpStorm.
* User: hippsterkiller
* Date: 10/26/12
* Time: 1:38 AM
* To change this template use File | Settings | File Templates.
*/
require __DIR__ . "/../src/Processus/Interfaces/NoSQLInterface.php";
<?php
namespace Application\JsonRpc\V1\ZeroMq;
class Request extends \Processus\Abstracts\JsonRpc\AbstractJsonRpcRequest
{
public function __construct()
{
}