Freetalk is command line
- Its goodness
- Its richness
- Its flexibility
- Its power
#!/bin/bash | |
list_large_files_checksum () | |
{ | |
local DIR=$1; | |
large_files="" | |
large_directories="" | |
# Get top ten culprit files | |
for i in $(du --exclude=".glusterfs" -akx $DIR | sort -nr | head -10 | awk {'print $2'}); do | |
if [ -f $i ]; then |
#!/usr/bin/env perl | |
# Borrowed from - http://search.cpan.org/~mlehmann/JSON-XS-3.01/bin/json_xs | |
# Modified for internal use in GlusterFS | |
use strict; | |
use Encode; | |
use JSON::XS; | |
my $opt_from = "json"; | |
my $opt_to = "null"; |
#!/bin/bash | |
function ping_host () | |
{ | |
{ | |
exec 4<>/dev/tcp/$1/$2 | |
if [ $? -ne '0' ]; then | |
echo "Port not reachable" | |
return 1; | |
else |
def factorial (a: Int, b: Int): Int = if (a == 1) b else if (a == 0) 1 else factorial (a - 1, a * b) |
#!/usr/bin/env python | |
import psutil | |
import sys | |
def pmap_find(p, name): | |
for m in p.memory_maps(grouped=True): | |
if m.path.endswith("%s.so" % name): | |
return True | |
continue | |
return False |
# cat find_same_inode.stap | |
#!/usr/bin/stap -g | |
# Copyright (c) 2014 Brad Hubbard <bhubbard@redhat.com> | |
%{ | |
#include <linux/file.h> | |
%} | |
function find_same_inode:string (path:string) %{ | |
struct nameidata *nd; |
import cv2 | |
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') | |
eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml') | |
cap = cv2.VideoCapture(0) | |
while(True): | |
# Capture frame-by-frame | |
ret, frame = cap.read() |
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
) | |
const ( | |
SPLIT_NFILES = 4 |
#!/usr/bin/stap | |
# | |
global write_errors, write_success | |
function handlewrite (pp, ret) { | |
if (ret < 0) | |
{ | |
printf("%s %s returned %d", tz_ctime(gettimeofday_s()), pp, ret) | |
write_errors[pp]++ | |
} |