Skip to content

Instantly share code, notes, and snippets.

View svagionitis's full-sized avatar

stavros vagionitis svagionitis

View GitHub Profile
@svagionitis
svagionitis / curltest.c
Last active September 27, 2020 11:57 — forked from aaronhurt/curltest.c
example code using libcurl and json-c to post and parse a return from http://jsonplaceholder.typicode.com
/**
* example C code using libcurl and json-c
* to post and return a payload using
* http://jsonplaceholder.typicode.com
*
* Requirements:
*
* json-c - https://github.com/json-c/json-c
* libcurl - http://curl.haxx.se/libcurl/c
*
@svagionitis
svagionitis / curl_multi_test.c
Created May 4, 2016 23:46 — forked from clemensg/curl_multi_test.c
libcurl multi interface example
/* curl_multi_test.c
Clemens Gruber, 2013
<clemens.gruber@pqgruber.com>
Code description:
Requests 4 Web pages via the CURL multi interface
and checks if the HTTP status code is 200.
Update: Fixed! The check for !numfds was the problem.
/* ========================================================================
$File: tools/ctime/ctime.c $
$Date: 2016/05/08 04:16:55PM $
$Revision: 7 $
$Creator: Casey Muratori $
$Notice:
The author of this software MAKES NO WARRANTY as to the RELIABILITY,
SUITABILITY, or USABILITY of this software. USE IT AT YOUR OWN RISK.
@svagionitis
svagionitis / .git-commit-template.txt
Created March 12, 2016 18:48 — forked from adeekshith/.git-commit-template.txt
A Git commit template to make it easy to enforce a good and uniform commit message style across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

#!/usr/bin/python
#gypify.py for GYP (http://code.google.com/p/gyp)
#Found @ http://code.google.com/p/gyp/issues/detail?id=82 (Oct 1, 2009)
#Download original @ http://gyp.googlecode.com/issues/attachment?aid=1601673567448205219&name=gypify.py&token=qm9EhXN3mZxrS1pniUgsh5nG6Bs%3A1328804204976
#Attached is a script that converts a set of existing Chromium-dependent
#.sln and .vcproj files to .gyp. It currently supports executable, shared
#library, static library and build event projects. The output .gyp file is
#created by:
/* Instructions on compilation and execution
* =========================================
*
* Compile this program with pthreads:
*
* g++ -Wall -lpthread -o graphdb-simulator graphdb-simulator.cpp
*
* Before you run this program, you need to create the following
* directories:
*
#ifndef ma_concurrent_queue_h
#define ma_concurrent_queue_h
// Based on code from http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html
// Original version by Anthony Williams
// Modifications by Michael Anderson
#include "boost/thread.hpp"
#include <deque>
@svagionitis
svagionitis / fsql.py
Created November 16, 2015 17:50 — forked from jcarbaugh/fsql.py
convert a MySQL dump into SQLite
#!/usr/bin/env python
# Convert a mysql dump into a sqlite-compatible format.
# I wrote this for just one script... no guarantess that it will work with others...
# python fsql.py < mysqldump.sql > readyforsqlite.sql
import re
import sys
content = sys.stdin.read()
@svagionitis
svagionitis / spectrogram.py
Created September 28, 2015 19:11 — forked from maurisvh/spectrogram.py
ANSI art spectrogram viewer that reads audio from a microphone
#!/usr/bin/python
import numpy
import pyaudio
import re
import sys
WIDTH = 79
BOOST = 1.0