Skip to content

Instantly share code, notes, and snippets.

View solebox's full-sized avatar
🐼
I may be slow to respond.

jacob kili solebox

🐼
I may be slow to respond.
View GitHub Profile
bundle init && gem list --local |head -n -1 | awk '{print "gem \47"$1"\47, " "\47"$2"\47"}'|sed 's/[()]//g' >> Gemfile
@solebox
solebox / woot
Created November 10, 2016 01:15
class FtpServer
def initialize(username, password)
@username = username
@password = password
end
def fxp(destination, local_path, remote_path)
remote_pass = destination.@password
local_pass = @password
public BruteCollinearPoints(Point[] points){
if (points == null)
throw new NullPointerException();
for (int p1 = 0; p1 < points.length; p1++){
for (int p2 = 0; p2 < points.length; p2++){
for (int p3 = 0; p3 < points.length; p3++){
for (int p4 = 0; p4 < points.length; p4++){
if (p1 != p2 && p1 != p3 && p1 != p4 && p2 != p3 && p2 != p4 && p3 != p4){
class A
def fooz
puts "bar"
end
end
class A
alias_method :super_send, :send
def send(symbol,*args)
#!/usr/bin/python
class Analyzer(object):
def __init__(self, filename):
self.parsed_file = []
data = []
with open(filename, "r") as csv_file:
data = csv_file.readlines()
data = [line.split(",") for line in data]
#!/usr/bin/python
import csv
class Analyzer(object):
def __init__(self, filename):
self.parsed_file = {"file_name": filename}
data = []
with open(filename, "r") as csv_file:
#!/usr/bin/python
import csv
import scipy.spatial.distance as distance
from collections import OrderedDict
import itertools
class Analyzer(object):
def __init__(self, filename):
#!/usr/bin/python2.7
import json
data = ""
with open("result.json", "r") as json_dump:
data = json.load(json_dump)
print("file_name: {}".format(data["file_name"]))
for student in data["students"]:
print("student first name: {}".format(student["student_name"]))
print("student last name: {}".format( student["student_last_name"]))
<?php
$server = "tcp:shirfisher.database.windows.net,1433";
$user = "shirfisher";
$pass = "Q1W2r4e3";
$database = "shirfisher";
$c = array("Database" => $database, "UID" => $user, "PWD" => $pass);
sqlsrv_configure('WarningsReturnAsErrors', 0);
$conn = sqlsrv_connect($server, $c);
if($conn === false)
{
<html>
<head>
<link rel="stylesheet" href="StyleSheet.css" type="text/css">
<title>Add New Car</title>
</head>
<body>
<h1>Add New Car</h1>
<h3>Fill this form in order to add new stations</h3>
<p><span class="error">* required field.</span></p>
<form method="post" action="fuck.php">