Skip to content

Instantly share code, notes, and snippets.

View hortinstein's full-sized avatar

Alex Hortin hortinstein

View GitHub Profile
########Exercise 2 (strcat_ba_test: 1 point). Complete the following function, strcat_ba(a, b),
#so that given two strings, a and b, it returns the concatenation of bfollowed by a
#(pay attention to the order in these instructions!).###########
def strcat_ba(a, b):
assert type(a) is str
assert type(b) is str
return(b + a) #Megan's Code
mystery_string = "fuck you and your cat's cat. Catface"
#You may modify the lines of code above, but don't move them!
#When you Submit your code, we'll change these lines to
#assign different values to the variables.
#Add some code below that will count and print how many
#times the character sequence "cat" appears in mystery_string.
#For example, for the string above, it would print 2.
#
var request = require('request');
var moment = require('moment');
const _ = require('lodash');
const colors = require('colors');
var btc_h = 15;
var eth_h = 15;
var etc_h = 15;
#include <stdlib.h> /* exit */
#include <unistd.h> /* read, write, close */
#include <string.h> /* memcpy, memset */
#include <sys/socket.h> /* socket, connect */
#include <netinet/in.h> /* struct sockaddr_in, struct sockaddr */
#include <netdb.h> /* struct hostent, gethostbyname */
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
@hortinstein
hortinstein / capstone admin
Last active August 7, 2020 00:00
capstone admin
http://68.183.136.30:3000
@hortinstein
hortinstein / gist:61c1bea14154d2e75792362608747fd1
Last active May 26, 2017 01:42
cloud microservice routing infrastructure
#!/usr/bin/env python
"""
Very simple REST centrak logging server in python.
Usage::
./central_logging_server [<port>]
Send a GET request::
curl http://localhost
Send a HEAD request::
curl -I http://localhost
Send a POST request:: (this is how you log)
#install tmux for 4 seperate terminals
#install docker
curl -sSL https://get.docker.com | sh
docker swarm init
find . -name "*.rar" -exec unrar x -o+ {} \;
cp *.mkv ../Plex/TV/
hortinstein@cucumber.whatbox.ca:/home/hortinstein/files/ whatbox/
a0:02:dc:52:80:ce