Skip to content

Instantly share code, notes, and snippets.

@j000
j000 / 2014-roz-napisy.cpp
Last active August 29, 2015 14:21
Matura 2014 - rozszerzony - Ciekawe napisy
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
bool czy_pierwsza(int a) {
for (int k = 2; k < a; ++k) { // 1 < k < a
if (a % k == 0) { // jesli dzieli sie bez reszty
return false; // to nie jest pierwsza
}
@j000
j000 / 2014-podst-liczby.cpp
Last active August 29, 2015 14:21
Matura 2014 - podstawowy - Pary liczb
#include <iostream>
#include <fstream>
using namespace std;
int sprawdzA (int x, int y) {
if (x % y == 0 || y % x == 0) // jak nie ma reszty z dzielenia
return 1; // jest wielokrotnoscia
return 0;
}
@j000
j000 / 2010-podst-palindromy.cpp
Last active August 29, 2015 14:21
Matura 2010 - podstawowy - Palindromy
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main () {
ifstream dane;
ofstream odpowiedz;
string a;
int dlugosc;
@j000
j000 / 2010-roz-anagramy.cpp
Last active August 29, 2015 14:21
Matura 2010 - rozszerzony - Anagramy
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
bool czy_rowne_dlugosci(string a[]) {
// piec slow
for (int k = 1; k < 5; ++k) {
if (a[k-1].size() != a[k].size()) // jesli rozna dlugosc
return false; // zwroc false

Keybase proof

I hereby claim:

  • I am j000 on github.
  • I am jarymut (https://keybase.io/jarymut) on keybase.
  • I have a public key whose fingerprint is 99A9 BFCD 5082 B6D2 D536 0675 9539 2918 9B50 7253

To claim this, I am signing this object:

@j000
j000 / client.conf
Last active August 22, 2023 11:43
My pulseaudio configs
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@j000
j000 / submit.py
Created December 6, 2016 02:53 — forked from ThyReaper/submit.py
Python script to upload code to Screeps
import urllib.request;
import json;
api = "https://screeps.com/api/user/code"
#Load account data
keys = open("key.txt");
account = keys.readline().strip("\n")
apikey = keys.readline().strip("\n")
@j000
j000 / factorio-recipe-parser.lua
Last active November 12, 2017 16:41 — forked from pfmoore/factorio-recipe-parser.lua
Parse the Factorio recipe files to create a CSV of recipes
local write = io.write
function print_me(write,...)
local n = select("#",...)
for i = 1,n do
local v = tostring(select(i,...))
write(v)
if i~=n then write'\t' end
end
write'\n'
end
@j000
j000 / freebsd-to-gentoo.sh
Last active June 9, 2017 23:47
DigitalOcean experiments
#!/bin/sh
##########
# usage:
# curl -O -L 'https://gist.github.com/j000/42a75d1402f723038a559047930773bc/raw/freebsd-to-gentoo.sh' && sudo sh freebsd-to-gentoo.sh
##########
if [ $(id -u) -ne 0 ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@j000
j000 / gentoo-on-cubieboard.md
Created June 15, 2017 01:02
Gentoo on Cubieboard