Skip to content

Instantly share code, notes, and snippets.

@viyatb
viyatb / .bashrc.sh
Last active August 29, 2015 14:06 — forked from yannk/.bashrc.sh
# add in your .bashrc
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# http://blog.cyberion.net/2009/01/improved-bash-prompt-for-git-usage.html
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master⚡]$ # dirty working directory
#
# I've made the following ajustements:
# - Use of plumbing, that should be faster than git status porcelain.
# - Don't show my repo as dirty if it has files unknown from the index (I always have).
@viyatb
viyatb / x.sh
Last active August 29, 2015 14:07
#!/bin/bash
# owtf is an OWASP+PTES-focused try to unite great tools and facilitate pen testing
# Copyright (c) 2014, Abraham Aranguren <[email protected]> Twitter: @7a_ http://7-a.org
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@viyatb
viyatb / lock.sh
Last active August 29, 2015 14:07 — forked from csivanich/lock.sh
#!/bin/bash
# i3lock blurred screen inspired by /u/patopop007 and the blog post
# http://plankenau.com/blog/post-10/gaussianlock
# Timings are on an Intel i7-2630QM @ 2.00GHz
# Dependencies:
# imagemagick
# i3lock
@viyatb
viyatb / error.txt
Created May 28, 2015 07:39
OWTF error
Step 18 : RUN /bin/bash owtf/scripts/owtfinstall.sh
[+] PostgreSQL server is not running.
[+] Can I start db server for you? [Y/n]
Starting PostgreSQL 9.1 database server:
main
Removed stale pid file. The PostgreSQL server failed to start. Please check the log output: 2015-05-28 07:30:08 UTC LOG: database system was interrupted; last known up at 2015-05-28 07:20:16 UTC 2015-05-28 07:30:08 UTC LOG: incomplete startup packet 2015-05-28 07:30:08 UTC FATAL: could not open file "/etc/ssl/certs/ssl-cert-snakeoil.pem": Permission denied 2015-05-28 07:30:08 UTC LOG: startup process (PID 82) exited with exit code 1 2015-05-28 07:30:08 UTC LOG: aborting startup due to startup process failure ...
failed!
failed!
[+] Postgres running on :
[+] OWTF db config points towards 127.0.0.1:5432
func EncodeStreamingVideo(streamingFile io.Reader, request ShouldCanceler) (*os.File, error) {
outputFilename := generateFilename("mp4")
// Actually start the command.
cmd := exec.Command("ffmpeg",
// Read input from stdin.
"-i", "-",
// ... environment-specific ffmpeg options ...
"-y", outputFilename)
@viyatb
viyatb / frontendDevlopmentBookmarks.md
Last active August 29, 2015 14:25 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@viyatb
viyatb / file1.txt
Created August 2, 2015 14:48
a gist for a user with token api call
String file contents
@viyatb
viyatb / workit.bash
Created October 12, 2015 06:00 — forked from gibatronic/workit.bash
Automatically run workon when entering a directory
function check_for_virtual_env {
[ -d .git ] || git rev-parse --git-dir &> /dev/null
if [ $? == 0 ]; then
local ENV_NAME=`basename \`pwd\``
if [ "${VIRTUAL_ENV##*/}" != $ENV_NAME ] && [ -e $WORKON_HOME/$ENV_NAME/bin/activate ]; then
workon $ENV_NAME && export CD_VIRTUAL_ENV=$ENV_NAME
fi
elif [ $CD_VIRTUAL_ENV ]; then