Skip to content

Instantly share code, notes, and snippets.

@sejr
sejr / caesar.cpp
Created April 15, 2014 18:41
This program utilizes the command line to encrypt / decrypt text files using the Vigenëre cipher - commonly referred to as the Caesar cipher.
// caesar.cpp ~ 6 December 2012
// SAMUEL ROTH ~ ECCS 1611
// This program utilizes the command line to encrypt / decrypt text files using
// the VigenËre cipher - commonly referred to as the Caesar cipher.
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
@sejr
sejr / routes.php
Created July 30, 2014 05:40
Contact form error
Route::get('contact', 'PageController@contact');
Route::post('contact', function() {
$data = Input::all();
Mail::send('emails.contact', $data, function($message)
{
$message->from($data['email'] , $data['username']);
$message->to('connect@creepr.co', 'The Creepr Network')->subject('Creepr Support Request');
@sejr
sejr / telnet.py
Last active June 24, 2024 11:46
Python Telnet
import sys
import getpass
import telnetlib
import socket
host = "192.168.9.130"
port = 25564
username = raw_input("Username: ")
password = getpass.getpass()

Keybase proof

I hereby claim:

  • I am sejr on github.
  • I am roth (https://keybase.io/roth) on keybase.
  • I have a public key whose fingerprint is 78CD 788C 22C7 2443 995A CBFF 8CE4 D328 F758 541E

To claim this, I am signing this object:

@sejr
sejr / Overlay.cpp
Created April 27, 2015 20:51
Segmentation Fault
void OsdManager::SetText(int region, QString text)
{
QFont font;
if (resolution == 'C')
font = QFont("Arial", 12);
else
font = QFont("Arial", 16);
QFontMetrics fm(font);
[
{
"short":"sharing-acquisition",
"title":"Sharing and Acquisition",
"description":"This is an example description for the purpose of debugging the user interface.",
"practices":[
{
"title":"Non-service related third-party sharing",
"true":"Website may share your personal information with other companies for purposes unrelated to the services you request.",
"false":"Website may not share your information with other companies for purposes unrelated to the services you request.",
@sejr
sejr / fib.js
Last active August 29, 2015 14:27
// input: integer, n
// output: nth number in fibonacci sequence
function fibonacci(n) {
return (n >= 2) ? (this.fibonacci(n-1) + this.fibonacci(n-2)) : (n);
}
@sejr
sejr / app.js
Last active April 23, 2016 05:29
Angular $http GET
$scope.weighItem = function() {
var result = {
value: 0,
unit: ''
}
$http({
method: 'GET',
url: 'https://jsonp.afeld.me/?url=http://smartshop-sjroot.rhcloud.com/api/readings'
$scope.weighItem = function() {
return $http({
method: 'GET',
url: 'https://jsonp.afeld.me/?url=http://smartshop-sjroot.rhcloud.com/api/readings'
});
}
$scope.updateReading = function() {
$scope.weighItem().then(function success(res) {
Verifying that +sjroth is my blockchain ID. https://onename.com/sjroth