Skip to content

Instantly share code, notes, and snippets.

View angel333's full-sized avatar

Ondra Simek angel333

View GitHub Profile
<html>
<head>
<script src='http://code.jquery.com/jquery-1.4.2.min.js' type='text/javascript'></script>
<script>
$(document).ready(function() {
$('#lookEditorToggler').click(function(e) {
e.preventDefault();
var output = document.body.innerHTML;
output = output.replace(/<!-- b\[(.+?)\] -->/g, '<a class="lookEditationLink">$1</a><div>');
@angel333
angel333 / gist:1339954
Created November 4, 2011 17:36
Odtrhávání nuly s tečkou...
// .. odtrhneme zbytecnou tecku s nulou
if (vysledek.endsWith(".0"))
vysledek = vysledek.substring(0, vysledek.length() - 2);
package gui;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JMenu;
@angel333
angel333 / DWM-ON-OS-X.md
Last active April 11, 2024 16:14 — forked from vangberg/DWM-ON-OS-X.md
Updated for .xinitrc.d and $USERWM, simplified

Installing and configuring dwm on OS X (tested on Mountain Lion, Mavericks)

  1. Install XQuartz.

  2. Install dwm using Homebrew (or whatever):

    brew install dwm
    
  3. Create a xinitrc.d script for dwm:

#!/bin/bash
#
# === MITize ===
# Create an MIT license file with one command.
# No parameters, just run it and forget about it.
#
# Check if there is not a license file already
[[ -f LICENSE || -f LICENSE.txt || -f LICENSE.md ]] &&
* INFO: - ./bootstrap.sh -- Version 2014.10.14
* WARN: Running the unstable version of bootstrap-salt.sh
* INFO: System Information:
* INFO: CPU: GenuineIntel
* INFO: CPU Arch: x86_64
* INFO: OS Name: Linux
* INFO: OS Version: 3.16.3-1-ARCH
* INFO: Distribution: Debian 7.7
<script src='bench.js'></script>
<html>
<head>
<title>hi</title>
</head>
<body>
hi
</body>
</html>
@angel333
angel333 / yum-installed
Last active November 19, 2016 14:53
This one-liner will list packages that were explicitly installed by user.
#/bin/sh
# Description: Lists packages that were explicitly installed by user.
# Run this: curl -Ls goo.gl/RV7oiB | sh
export LC_ALL=C
MIN=2 # First is the OS installation
MAX=$(yum history | awk 'NR==4 { print $1 }')
@angel333
angel333 / infimouse.au3
Created December 6, 2016 13:52
If you move mouse to one border, it'll come from the other.
;
; Infimouse.au3
; an AutoIt script
;
; Author: Ondrej Simek
; License: MIT
;
; If you move mouse to one border, it'll come from the other.
;
; Works for multiple screens too, but will have issues if the screen