This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class Array | |
def square | |
self.length.times do |i| | |
yield self[i] ** 2 | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ===================================================================================== | |
* | |
* Filename: math_test.c | |
* | |
* Description: simple math tests | |
* | |
* Version: 1.0 | |
* Created: 02/15/2014 10:55:35 PM | |
* Revision: none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'inline' | |
class Primes | |
inline do |builder| | |
builder.c ' | |
void prime(unsigned long amount) { | |
int *list; | |
unsigned long i,x,d; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ===================================================================================== | |
* | |
* Filename: c_prime.c | |
* | |
* Description: find prime numbers up to (n) | |
* | |
* Version: 1.0 | |
* Created: 02/17/2014 12:00:27 AM | |
* Revision: none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
def help | |
puts "#{$0} <find_primes_to>" | |
end | |
def find_primes(array_list) | |
array_list.each do |num| | |
i = num | |
if num * i > array_list.last |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'net/scp' | |
Net::SSH.start('host','user',keys: ["~/.ssh.id_rsa.pub"]) do |ssh| | |
output = ssh.exec!("id;ifconfig;hostname") | |
puts output | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'readline' | |
module Shell | |
PROMPT = "shell> " | |
module InputCompletor | |
CORE_WORDS = %w[ clear help show exit export] | |
SHOW_ARGS = %w[ list user ] | |
EXPORT_ARGS = %w[ file ] | |
COMPLETION_PROC = proc { |input| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
//"bufio" | |
"bytes" | |
"crypto/md5" | |
"fmt" | |
"io" | |
"os" | |
"runtime" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BURPFOLDER="$HOME/Documents/burp" | |
SAVESTATEROOT="$BURPFOLDER/burpState" | |
cd $BURPFOLDER | |
# LATESTBURP=$(ls -1 burpsuite* | tail -n 1) | |
LATESTBURP=$(ls -1t burp*.jar | head -n1) | |
echo "Running ${LATESTBURP}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2011 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// All credit to https://storage.googleapis.com/go-attachment/5884/7/strip.go | |
package strip | |
import ( | |
"bytes" | |
"encoding/json" |
OlderNewer