Skip to content

Instantly share code, notes, and snippets.

View KronicDeth's full-sized avatar

Elle Imhoff KronicDeth

View GitHub Profile
......
1) test HTTPS GET / (RoutingSecurelyWithPhoenixFramework.PageControllerTest)
test/controllers/page_controller_test.exs:13
** (RuntimeError) expected response with status 200, got: 301
stacktrace:
(phoenix) lib/phoenix/test/conn_test.ex:316: Phoenix.ConnTest.response/2
(phoenix) lib/phoenix/test/conn_test.ex:330: Phoenix.ConnTest.html_response/2
test/controllers/page_controller_test.exs:15
#include <iostream> // includes and statements section
using std::cin; // user input
using std::cout; // machine output
using std::endl; // for line breaks
int main () {
int coupons;
cout << "How many coupons did you win?" << endl;
do {
cout << "What is your guess?" << endl;
cin >> guess;
if (guess < magicNumber);
{
cout << "You guessed too low!" << endl;
}
else if (guess > magicNumber);
#include <iostream> // includes and statements section
#include <string> // strings
#include <cstdlib> // c standard library
#include <ctime> // time
using std::cin; // user input
using std::cout; // machine output
using std::endl; // for line breaks
using std::strtol; // convert string to int
using std::string; //string
// Regina Imhoff
// Ecampus CS 161
// Assignment #6
// makes histogram of students' grades as entered by an instructor
#include <iostream> // includes and statements section
#include <string> // strings
#include <cstdlib> //c standard library
#include <stdio.h>
#include <string.h>
@KronicDeth
KronicDeth / module_ancestor_paths.rb
Created October 23, 2014 13:14
File paths for a metasploit-framework module, including staged payloads where the reference name of the payload Class does not match the path to the stage and stager
# 1. Run `msfconsole`
# 2. Select an module `use payload/windows/patchupdllinject/bind_tcp_rc4`
# 2. Enter `irb` mode
# active_module is the module selected with `use`
module_ancestors = active_module.class.ancestors.select { |ancestor|
ancestor.name.try(:start_with?, 'Msf::Modules::')
}
hex_unpacked_module_ancestor_full_names = module_ancestors.map(&:name).map { |name|
name.sub(/^Msf::Modules::Mod/, '')
#include <iostream>
#include <fstream>
#include <string>
//***********************************
// A program to search through 4 different files looking for a number, 5
//***********************************
void insertSort(int arrayToSort[], int arraySize){
@KronicDeth
KronicDeth / Explanation.md
Created January 3, 2015 02:07
CharList vs String in quotes and quoted atoms

When using interpolation, inside single quotes, the contents of the Elixir CharList (Erlang string) are internally represented as an Elixir String (Erlang binary) and only become a CharList at the end with a hidden call to String.to_char_list/1 that you can see in the quoted form, so any CharList with interpolation can be written directly as a String.to_char_list(string_with_interpolation) instead for the same quoted form.

When : is added before either the CharList or the String, the quoted form is the same (the only difference is due to the single or double quotes around the interpolated bar). This can be thought of as either (a) quotes for atoms don't have the same meaning as they do normally or (b) when single quotes are used, the String.to_char_list/1 call is stripped when wrapped in the :erlang.binary_to_atom/1 call.

@KronicDeth
KronicDeth / sh.txt
Created May 15, 2015 20:28
make clean; make test in elixir-lang/elixir
> make clean
cd lib/elixir && ../../rebar clean
==> elixir (clean)
rm -rf ebin
rm -rf lib/*/ebin
rm -rf lib/elixir/test/ebin
rm -rf lib/*/tmp
rm -rf lib/mix/test/fixtures/git_repo
rm -rf lib/mix/test/fixtures/deps_on_git_repo
rm -rf lib/mix/test/fixtures/git_rebar
package org.elixir_lang.psi.impl;
import com.ericsson.otp.erlang.*;
import org.elixir_lang.Macro;
public class ElixirPsiImplUtil {
private static final OtpErlangAtom UNQUOTE_SPLICING = new OtpErlangAtom("unquote_splicing");
/**
* Unwraps <code>quote_splicing</code> in stabOperation.