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
#!/bin/bash
# rrrrrreeaaal lazy usage, still awesome -> for i in *;do ./post.sh $i "+$count hour" && count=$(($count+1)) && echo $count && sleep 1;done
token="your api token , make sure it has page upload permissions, too lazy to figure out how to make one? try this page: https://developers.facebook.com/tools/explorer/145634995501895/?method=GET"
photka="$1"
sched_time=$(date -d "$2" +"%s")
if [ -z "$1" ]; then
echo "usage: <photka path> [<pub-time>]"
echo ""
echo "<pub-time> values: +1 day, +1 hour, just like with date"
echo ""
#!/bin/bash
token="your api token , make sure it has page upload permissions, too lazy to figure out how to make one? try this page: https://developers.facebook.com/tools/explorer/145634995501895/?method=GET"
photka="$1"
sched_time=$(date -d "$2" +"%s")
if [ -z "$1" ]; then
echo "usage: <photka path> [<pub-time>]"
echo ""
echo "<pub-time> values: +1 day, +1 hour, just like with date"
echo ""
echo "examples:"
#!/bin/bash
token="EAACEdEose0cBAOekRbHcKZBCGgbuyQGMCIc6k2rGY2VLH5l3I4hbXdAUsnrZBZCZAhqpaIKDy9x4hmEyDX8B3v0vxkZBRKmD8yFRTfNUKk2WZCjxISfphlcExK7gIwgjehwfLIonGINWQupBLRmHwgqeRZBbyKYWqnQvIezi4dpMZCIB74vtvGHe"
photka="$1"
sched_time=$(date -d "$2" +"%s")
if [ -z "$1" ]; then
echo "usage: <photka path> [<pub-time>]"
echo ""
echo "<pub-time> values: +1 day, +1 hour, just like with date"
echo ""
echo "examples:"
<?php
// Connecting to the database
$top = "<html>
<head>
<link rel="stylesheet" href="StyleSheet.css" type="text/css">
<style>
img {
display: block;
margin: 0 auto;
<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">
<?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)
{
#!/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"]))
#!/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/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
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]