Skip to content

Instantly share code, notes, and snippets.

View Marahin's full-sized avatar
:shipit:
self.class.new

Jasiek Matusz Marahin

:shipit:
self.class.new
View GitHub Profile
➜ xgo git:(master) ✗ ./xgo -x -v --deps=https://downloads.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz\?r\=\&ts\=1500380157\&use_mirror\=netcologne\ https://dropbox.gimb.us/b/eafaa5ae36898da07a3dac1ad08f8ecc.gz --targets=windows/amd64 ~/Code/go/src/git.3lab.re/marahin/artsh_helper_11
Checking docker installation...
Client:
Version: 17.06.0-ce
API version: 1.30
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:31:53 2017
OS/Arch: darwin/amd64
➜ xgo git:(master) ✗ ./xgo -x -v --targets=windows/amd64 ~/Code/go/src/git.3lab.re/marahin/artsh_helper_11
Checking docker installation...
Client:
Version: 17.06.0-ce
API version: 1.30
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:31:53 2017
OS/Arch: darwin/amd64
@Marahin
Marahin / kappa.rb
Last active February 9, 2017 10:50
✗ pry
[1] pry(main)> module Kappa
[1] pry(main)* def Kappa.parser
[1] pry(main)* if ! @name
[1] pry(main)* sleep(5)
[1] pry(main)* @name = 'John'
[1] pry(main)* end
[1] pry(main)* @name
[1] pry(main)* end
[1] pry(main)*
module KappaOne
## I want the value of 'test' to be memoized & available in class KappaOneOne and KappaOneTwo
def test
@test ||= some_timetaking_method
end
class KappaOneOne
def initialize
@val = test.to_s
end
<html>
<head>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"> </script>
</head>
<body>
<form>
<input type="text" id="wejscie_zapisywane" style="width: 100%;" />
</form>
<!-- logika -->
@Marahin
Marahin / base.cpp
Created May 12, 2016 15:37
Szkielet programu przeliczającego systemy liczbowe (2-16), NIEDOKOŃCZONY. Aktualnie **powinno** działać dobrze dla 2.
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
using namespace std;
@Marahin
Marahin / memusg
Created May 1, 2016 00:37 — forked from netj/memusg
memusg -- Measure memory usage of processes
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <netj@sparcs.org>
# Created: 2010-08-16
############################################################################
# Copyright 2010 Jaeho Shin. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
@Marahin
Marahin / i3-cheat-sheet.md
Created February 29, 2016 10:32 — forked from JeffPaine/i3-cheat-sheet.md
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
#Mod1 for ALT and Mod4 for Winkey
set $modkey Mod4
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
local shopModule = ShopModule:new()