This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function usageexit() { | |
printf "Usage: %s output.ps [file..]\n" $(basename $0) | |
exit 2 | |
} | |
if (($# < 2)) | |
then | |
usageexit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int suma_liczb(int tablica[], int size); | |
int iloczyn_liczb(int tablica[], int size); | |
void minmax(int tablica[], int size, int* min, int* max); | |
int main() { | |
int liczby[6]; // x = liczby[0], y = liczby[1], z = liczby[2] | |
int najmniejsza, najwieksza; | |
printf("podaj pierwsza liczbe calkowita: "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
function usageexit() { | |
echo "Usage: $(basename $0) [PORT] [other mongodb options]" >&2 | |
exit 1 | |
} | |
dbpath=$HOME/.data/var/lib/mongodb | |
config_file=$HOME/bin/mongodb.config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Values to be changed | |
# | |
port 6379 | |
# | |
pidfile /home/wbzyl/.data/var/run/redis.pid # mkdir -p ~/.nosql/var/run/ | |
# | |
bind 0.0.0.0 | |
# | |
# The filename where to dump the DB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Use Markdown, sometimes, in your HTML. | |
// @author Paul Irish <http://paulirish.com/> | |
// @link http://git.io/data-markdown | |
// @match * | |
// ==/UserScript== | |
// If you're not using this as a userscript just delete from this line up. It's cool, homey. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- set up the modal to start hidden and fade in and out --> | |
<div id="myModal" class="modal hide fade"> | |
<!-- dialog contents --> | |
<div class="modal-body"> | |
Hello world! | |
</div> | |
<!-- dialog buttons --> | |
<div class="modal-footer"> | |
<a href="#" class="btn primary">OK</a> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(int argc, char *argv[]) { | |
int c; | |
int nb = 0; /* liczba znaków odstępu */ | |
int nt = 0; /* liczba znaków tabulacji */ | |
int nl = 0; /* liczba znaków nowego wiersza */ | |
FILE *fin, *fout; | |
if ((fin = fopen(argv[1], "r")) == NULL) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# =================================================================================================================== | |
# Template for generating a no-frills Rails application with support for ElasticSearch full-text search via Tire | |
# =================================================================================================================== | |
# | |
# This file creates a basic, fully working Rails application with support for ElasticSearch full-text search | |
# via the Tire gem [http://github.com/karmi/tire]. | |
# | |
# You DON'T NEED ELASTICSEARCH INSTALLED, it is installed and launched automatically by this script. | |
# | |
# Requirements |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require 'sinatra' | |
set server: 'thin', connections: [] | |
get '/' do | |
halt erb(:login) unless params[:user] | |
erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
end | |
get '/stream', provides: 'text/event-stream' do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reversed or “Real Time” Search in ElasticSearch | |
# ==================================================================================== | |
# You may have come across the term “realtime search” lately | |
# (eg. [here](http://engineering.socialcast.com/2011/05/realtime-search-solr-vs-elasticsearch/)) | |
# and wondered what all the fuss is about. | |
# | |
# Well, the usual workflow with search engines goes like this: | |
# | |
# 1. You index some documents. |