This file contains 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
from hashlib import sha1 | |
import hmac | |
TEXT = "37897892379ARIU" | |
def hmac_msg(message): | |
key = "Secr3t_passWor6" | |
hashed = hmac.new(key, message, sha1) |
This file contains 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
using System.Collections; | |
using System.Collections.Generic; | |
namespace Eratostene | |
{ | |
/** | |
* Compute Prime Numbers | |
* | |
* Example: | |
<code> |
This file contains 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 | |
# PERMUTATIONS COMPUTER | |
# based on Bogomolyn algorithm | |
# http://www.bearcave.com/random_hacks/permute.html | |
# Author: Alessio Saltarin http://axsaxs.altervista.org/ | |
class PermutationComputer | |
attr_reader :bigbox # Array of permutations |
This file contains 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/ruby1.8 -w | |
# | |
# A Simple Hash Code Calculator | |
# Returns SHA1 and MD5 hash for any given file | |
# Author: Alessio Saltarin | |
# | |
require 'digest/md5' | |
require 'digest/sha1' |
This file contains 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 | |
# | |
# Compute prime numbers | |
# with the good old Eratostene Sieve method | |
# Author: Alessio Saltarin | |
# | |
# Eratostene Sieve computer class |
This file contains 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
""" | |
DirDeleter.py v0.2 | |
by Alessio Saltarin | |
Usage: python dirdeleter.py [initial_directory] [string] | |
Walks over all sub-directories starting from | |
[initial_directory] and deletes every directory that has | |
its name equal to [string] or containing [string] | |
This file contains 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
/** | |
* Permutations Computer | |
* based on Bogolomyn algorithm | |
* Author: Alessio Saltarin | |
*/ | |
/** | |
* Computes all permutations of a sequence of numbers | |
* @param permSize size of the sequence - ie.: 7 = (1,2,3,4,5,6,7) |
This file contains 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
/** | |
* Eratostene Sieve algorithm | |
*/ | |
package eratostene | |
/** | |
* Find prime numbers using Eratostene Sieve | |
* @param maxPrime Find primes to maxPrime | |
* @example |
This file contains 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 bash | |
git remote -v | |
git remote rm origin | |
git remote add origin https://[git repo] | |
git push -u origin master | |
git remote -v |
This file contains 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
dpkg --list | grep linux-image | |
dpkg --list | grep linux-headers | |
sudo apt-get purge linux-image-3.19.0-{18,20,21,25} | |
sudo apt-get purge linux-headers-3.19.0-{18,20,21,25} |
OlderNewer