Skip to content

Instantly share code, notes, and snippets.

View scriptum's full-sized avatar

Pavel Roschin scriptum

View GitHub Profile
#!/bin/sh
# source global definitions
[[ -f /etc/bashrc ]] && . /etc/bashrc
# toggle keyboard layout with caps lock
setxkbmap -option grp:caps_toggle
# enable core dumps
# ulimit -S -c unlimited
# Geany's snippets configuration file
#
# use \n or %newline% for a new line (it will be replaced by the used EOL char(s) - LF, CR/LF, CR).
# use \t or %ws% for an indentation step, it will be replaced according to the current document's indent mode.
# use \s to force whitespace at beginning or end of a value ('key= value' won't work, use 'key=\svalue').
# use %key% for all keys defined in the [Special] section.
# use %cursor% to define where the cursor should be placed after completion. You can define multiple
# %cursor% wildcards and use the "Move cursor in snippet" to jump to the next defined cursor
# position in the completed snippet.
# You can define a section for each supported filetype to overwrite default settings, the section
@scriptum
scriptum / test.txt
Created July 30, 2015 20:02
Mixed CR LF CR+LF file
1
22
33
444
55555
needle: hello
old 1.16 307
new 0.8300000000000001 307
needle: hellohellohellohellohellohellohellohellohellohello
old 0.1899999999999999 0
new 0.2600000000000002 0
needle: hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohelloh
old 0.009999999999999787 0
new 0.25 0
needle: HELL
diff --git a/Thunar/thunar/thunar-folder.c b/Thunar/thunar/thunar-folder.c
--- a/Thunar/thunar/thunar-folder.c
+++ b/Thunar/thunar/thunar-folder.c
@@ -769,7 +769,7 @@ thunar_folder_monitor (GFileMonitor *monitor,
}
}
- else if (event_type == G_FILE_MONITOR_EVENT_MOVED)
+ else if (event_type == G_FILE_MONITOR_EVENT_MOVED && other_file)
{
==21739== Memcheck, a memory error detector
==21739== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==21739== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==21739== Command: ./bin/nim2 c compiler/nim
==21739== Parent PID: 3300
==21739==
==21739== Conditional jump or move depends on uninitialised value(s)
==21739== at 0x4F33B8: gcmark_69046 (stdlib_system.c:1923)
==21739== by 0x4F33B8: markstackandregisters_70640 (stdlib_system.c:1951)
==21739== by 0x4F4D53: collectctbody_73021 (stdlib_system.c:2892)
This file has been truncated, but you can view the full file.
==11617== Memcheck, a memory error detector
==11617== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==11617== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==11617== Command: ./bin/nim c compiler/nim
==11617== Parent PID: 3300
==11617==
==11617== Conditional jump or move depends on uninitialised value(s)
==11617== at 0x560B90: markstackandregisters_70640 (in /home/rpg/Downloads/nim-0.11.2/bin/nim)
==11617== by 0x562F3B: collectctbody_73021 (in /home/rpg/Downloads/nim-0.11.2/bin/nim)
==11617== by 0x565A77: copyString (in /home/rpg/Downloads/nim-0.11.2/bin/nim)
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.FizzBuzz;
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.parameters.FizzBuzzUpperLimitParameter;
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl.parameters.DefaultFizzBuzzUpperLimitParameter;
@scriptum
scriptum / gtk.suppression
Created June 27, 2015 18:43
GTK valgrind suppresions
#
# Valgrind suppression file for Geany by RPG
#
# Format specification:
# http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress
#
#pango
{
@scriptum
scriptum / tower.c
Created June 22, 2015 18:44
Towers
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
typedef struct { int *x, n; } tower;
tower *new_tower(int cap)
{
tower *t = calloc(1, sizeof(tower) + sizeof(int) * cap);
t->x = (int*)(t + 1);
return t;