Skip to content

Instantly share code, notes, and snippets.

View bambuchaAdm's full-sized avatar

Łukasz Dubiel bambuchaAdm

View GitHub Profile
(defun my-buffers-list ()
(interactive)
(select-window (list-buffers)))
(global-set-key (kbd "C-x C-b") #'my-buffers-list)
@bambuchaAdm
bambuchaAdm / empty.rb
Created November 2, 2012 13:52
rbNFA test example
it "empty grapth form empty token stream" do
graph = parser.parse([])
graph.begin.should have(1).next
graph.begin.next.first.should be graph.end
end
@bambuchaAdm
bambuchaAdm / base.lisp
Last active December 13, 2015 17:48
Postawy. Przykład z DDD 164 lecz lekko obcięty dla możliwości napisania tego bardzo prosto. * TODO rozrzucić po plikach * Dorzucenie makr generujących część klas...
(defquery cergo-statu (cargo)
(render-view :cergo-statu (cargo-history carg)))
(defcomand create-cargo (destination)
(emit 'cargo-assumed
:id (gen-id)
:specyfiacation (make-delivery-specyfiaction destination)))
(defcomand shedule-carrier (form to cargo)
(emit 'transport-sheduled :form form :to to :cargo cargo))
@bambuchaAdm
bambuchaAdm / BasicBean.java
Last active March 22, 2022 09:05
Spring data page converter
package eu.devhe.testng.beans;
public class BasicBean {
private String name;
private String code;
public BasicBean() {
super();
@bambuchaAdm
bambuchaAdm / cyclonic-filter.scsd
Created November 9, 2013 13:21
Filtr cyklonowy - modelowane w scadzie
module stozek(h,r1,r2){
wall = 1;
difference() {
cylinder(h, r1, r2);
cylinder(h, r1-wall, r2-wall);
}
}
module profil(l,a,b,d) {
difference(){
@bambuchaAdm
bambuchaAdm / lxc-0.9.0-autoconf-docbook-names.patch
Last active December 28, 2015 12:59
Gentoo lxc-0.9.0 ebuild
--- lxc-0.9.0/configure.ac
+++ lxc-0.9.0/configure.ac
@@ -60,14 +60,14 @@ AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"])
# Documentation (manpages)
AC_ARG_ENABLE([doc],
- [AC_HELP_STRING([--enable-doc], [make mans (require docbook2x-man installed) [default=auto]])],
+ [AC_HELP_STRING([--enable-doc], [make mans (require docbook2man.pl installed) [default=auto]])],
[], [enable_doc=auto])
@bambuchaAdm
bambuchaAdm / bldc.ino
Created November 23, 2013 05:55
poor man bldc driver
struct Kanal {
int gora;
int dol;
};
Kanal zielony = { 2, 5};
Kanal czerwony = { 3, 6};
Kanal zolty = { 4, 7};
@bambuchaAdm
bambuchaAdm / openssh.log
Created December 8, 2013 16:14
Go ssh error.
OpenSSH_6.4, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /home/bambucha/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to localhost [::1] port 2223.
debug1: Connection established.
debug1: identity file /home/bambucha/.ssh/id_rsa type 1
debug1: identity file /home/bambucha/.ssh/id_rsa-cert type -1
debug1: identity file /home/bambucha/.ssh/id_dsa type -1
debug1: identity file /home/bambucha/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
@bambuchaAdm
bambuchaAdm / query.scala
Created January 21, 2014 20:29
Slick things
def deleteAll(value: Seq[Model]) = {
value.foldLeft(Query(this)){ (query, model: Model) =>
query.filter(_.store === model.name)
}.delete
}
static
int **
some something(int * tab,int size)
{
int ** main_tab = malloc(size * sizeof(int *));
int i=0,j=0;
for(i = 0; i < size; ++i){
main_tab[i] = malloc(tab[i] * sizeof(int));
for(j = 0; j < tab[i]; ++j){
main_tab[i][j] = j;