Skip to content

Instantly share code, notes, and snippets.

View Michal-Szczepaniak's full-sized avatar

Michał Szczepaniak Michal-Szczepaniak

View GitHub Profile
@Michal-Szczepaniak
Michal-Szczepaniak / zad1.cpp
Last active September 24, 2015 15:09
1 Sprawdzian
#include <iostream>
using namespace std;
//Pole trapezu
class trapez {
private:
int a,b,h;
public:
int pole() {
<script language="javascript" type="text/javascript">
//FUNKCJA ZMIENIAJACA LICZBE OZNACZAJACA MIESIAC NA NAZWE MIESIACA - ZAMIAST SWITCHY MOGA BYC IFY
function miesiace(x)
{
var miesiac;
switch(x.getMonth()+1)
{
case 1 : miesiac="styczen"; break;
case 2 : miesiac="luty"; break;
@Michal-Szczepaniak
Michal-Szczepaniak / Form1.cs
Last active October 15, 2015 09:57
Okienka z plikami
/**
* Bez openFileDialog
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
@Michal-Szczepaniak
Michal-Szczepaniak / Hello.java
Last active November 26, 2015 14:29
silnia
import java.util.Scanner;
import java.math.BigInteger;
import java.io.PrintWriter;
import java.io.File;
public class Hello{
public static BigInteger n,sum,i,d;
public static int cores;
static class MyThread implements Runnable {
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="ixmoe/android_device_moto_shamu_t" path="device/motorola/shamu_t" revision="cm-14.1" />
<project name="ixmoe/android_kernel_moto_shamu_t" path="kernel/motorola/shamu_t" revision="cm-14.1" />
<project name="ixmoe/android_vendor_motorola_shamu_t" path="vendor/motorola/shamu_t" revision="cm-14.1" />
</manifest>
This file has been truncated, but you can view the full file.
foidbgen 2016 2800 2016 1 44 Jan08 ? 00:52:34 /usr/lib64/chromium/chromium --ppapi-flash-path=/usr/lib64/chromium/PepperFlash/libpepflashplayer.so --ppapi-flash-version=28.0.0.126 --password-store=detect --enable-threaded-compositing --ui-disable-partial-swap --explicitly-allowed-ports=6697
foidbgen 2016 2800 2020 0 44 Jan08 ? 00:07:07 /usr/lib64/chromium/chromium --ppapi-flash-path=/usr/lib64/chromium/PepperFlash/libpepflashplayer.so --ppapi-flash-version=28.0.0.126 --password-store=detect --enable-threaded-compositing --ui-disable-partial-swap --explicitly-allowed-ports=6697
foidbgen 2016 2800 2027 0 44 Jan08 ? 00:00:00 /usr/lib64/chromium/chromium --ppapi-flash-path=/usr/lib64/chromium/PepperFlash/libpepflashplayer.so --ppapi-flash-version=28.0.0.126 --password-store=detect --enable-threaded-compositing --ui-disable-partial-swap --explicitly-allowed-ports=6697
foidbgen 2016 2800 2028 0 44 Jan08 ? 00:00:00 /usr/lib64/chromium/chromium --ppapi-flash-path=/u
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.9.184 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_MMU=y
CONFIG_DEBUG_RODATA=y
CONFIG_ARM64_PAGE_SHIFT=12
@Michal-Szczepaniak
Michal-Szczepaniak / client.nim
Created October 20, 2021 17:20
Nim UDP server discovery
import net
let socket = newSocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
socket.setSockOpt(OptReuseAddr, true)
socket.setSockOpt(OptReusePort, true)
socket.setSockOpt(OptBroadcast, true)
socket.sendTo("255.255.255.255", Port(12346), $0b10)
var
receivedFrom = ""
@Michal-Szczepaniak
Michal-Szczepaniak / client.nim
Created October 20, 2021 18:17
Nim async UDP server discovery and TCP server connection
import asyncnet, asyncdispatch, nativesockets
proc discover(): Future[string] {.async.} =
let socket = newAsyncSocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
socket.setSockOpt(OptReuseAddr, true)
socket.setSockOpt(OptReusePort, true)
socket.setSockOpt(OptBroadcast, true)
await socket.sendTo("255.255.255.255", Port(12346), $0b10)
var data = await socket.recvFrom(15)
import xbmc
from pywizlight import wizlight, PilotBuilder
class XBMCPlayer( xbmc.Player ):
def __init__(self, *args):
xbmc.Player.__init__(self)
xbmc.log('Kodi WiZ __init__')
def onPlayBackStarted( self ):