Skip to content

Instantly share code, notes, and snippets.

View Catsquotl's full-sized avatar

Catsquotl Catsquotl

View GitHub Profile
@Catsquotl
Catsquotl / crack.c
Created June 14, 2019 00:10
crack tryout cs50
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <crypt.h>
char next(char c);
int main(int argc, string argv[])
{
//check correct usage.
string word = "LOp";
string check = crypt(word, salt);
for(int i = 0;i<5;i++)
{
if (strcmp(check, argv[1])==0)
{
result = true;
break;
}
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(int argc, string argv[])
{
string cipher_key;
//check to see if argv has only one argument. [0] == prog-name hence the <=2
//if it does assign it to var.
require_relative 'character'
class Marshal < Character
def initialize *arr
super arr
@key_stat = get_key_stat [@dex,@wis]
end
def vacancy_penalty
sudo apt-get install supercollider ruby2.0 libqscintilla2-dev ruby-dev cmake pkg-config g++
Package ruby2.0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ruby2.0' has no installation candidate
--------------------------------------------------------
apt search ruby |grep ruby
def check num
fizz_buzzez= []
if num % 3 == 0
fizz_buzzez << 'Fizz'
end
if num % 5 == 0
fizz_buzzez << 'Buzz'
end
fizz_buzzez
end
@Catsquotl
Catsquotl / gist:4345965
Created December 20, 2012 15:31
basic initialize method to separate command line options from filenames. args should become ARGV in the implementation
def initialize *args
@files = []
@switches = []
until args.first.to_s.include?('-') == false
tmp_switch = args.shift
@switches.push(tmp_switch)
end
until args.empty?
tmp_file = args.shift
@files.push(tmp_file)