Skip to content

Instantly share code, notes, and snippets.

@opilar
opilar / template.cpp
Created January 7, 2012 18:53
Default template for C++.
#include <fstream>
using namespace std;
ifstream cin ("input.txt");
ofstream cout ("output.txt");
int main ()
{
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@ariallas
ariallas / server.cpp
Created March 28, 2012 17:40
Console chat
#include <iostream>
#include <sstream>
using namespace std;
#define _WINSOCKAPI_
#include <WinSock2.h>
#pragma comment (lib, "Ws2_32.lib")
#define SERVER_ADDRESS "192.168.1.2"
//#define SERVER_ADDRESS "93.181.195.49"
@piatra
piatra / index.html
Created July 27, 2012 19:52
music player in the browser
<!doctype html public "✰">
<html>
<head>
<title>music player</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:600' rel='stylesheet' type='text/css'>
<style>
body {
font-family:'Open Sans';
font-weight: 600;
-webkit-animation:bg 30s;
@vojto
vojto / gist:3954249
Created October 25, 2012 17:41
Cocoa script for getting definitions of words
int main(int argc, const char * argv[])
{
@autoreleasepool {
if (argc == 1) {
return 1;
}
NSString *word = [NSString stringWithCString:argv[1] encoding:NSUTF8StringEncoding];
CFStringRef result = DCSCopyTextDefinition(nil, (__bridge CFStringRef)word, CFRangeMake(0, word.length));
@mendelgusmao
mendelgusmao / btsync
Last active March 4, 2021 15:37
init.d script for btsync (based on another script built to run dropbox)
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsync
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Multi-user daemonized version of btsync.
@JeffreyWay
JeffreyWay / .bash_profile
Created May 8, 2013 18:02
Laravel aliases
# laravel new-app
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git"
alias artisan="php artisan"
alias migrate="php artisan migrate"
alias serve="php artisan serve"
alias dump="php artisan dump"
alias t="phpunit"
# Generators Package
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,