This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/include/sway/commands.h b/include/sway/commands.h | |
index 3ed00763..ae1e3f31 100644 | |
--- a/include/sway/commands.h | |
+++ b/include/sway/commands.h | |
@@ -154,6 +154,7 @@ sway_cmd cmd_no_focus; | |
sway_cmd cmd_output; | |
sway_cmd cmd_permit; | |
sway_cmd cmd_popup_during_fullscreen; | |
+sway_cmd cmd_raise; | |
sway_cmd cmd_reject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fn = 50; | |
// distance between holes in the linear bearing | |
bearing_hole_distance = 18; | |
// diameter of the m4 holes in the linear bearing | |
bearing_hole_diameter = 3.9; | |
// how much space to the left and right of the holes | |
bearing_plate_padding = 2.5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// make a 75wx40dx25h hollow square | |
height = 25; | |
width = 75; | |
depth = 45; | |
thickness = 2; | |
// stereo jack/switch mounting holes | |
hole_diameter = 6; | |
// width of corner support columns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
FILE* fp = fopen("/proc/meminfo", "r"); | |
if (fp != NULL) { | |
char buf[128]; | |
int total, avail; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#define BUF_SIZE 4096 | |
typedef struct { | |
unsigned long int user; | |
unsigned long int nice; | |
unsigned long int system; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import i3ipc | |
import subprocess | |
# process all windows on this workspace. hide when leaving and show when entering | |
# because chrome/ium doesnt consider itself hidden when on an invisible workspace | |
# this script drops my cpu usage when listening to google music from ~10% to ~3% | |
MUSIC_WS_INDEX = 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import base64 | |
import os | |
import sys | |
import urllib2 | |
import xml.etree.ElementTree | |
def openUrl(urlStr, user, passwd): | |
req = urllib2.Request(urlStr) | |
authStr = base64.encodestring('%s:%s' % (user, passwd)).strip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this parses the openvpn connection log for any suspected attackers and blocks them, also uses geoiplookup to show the country :) | |
LIST=$1 | |
COUNT=0 | |
for IP in `cat /var/log/openvpn.log | grep attack | grep -oE "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" | sort -u`; do | |
LOCATION=`geoiplookup $IP | awk -F ": " '{print$2}'` | |
if [ -z "$LIST" ]; then | |
# check for existing rule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_git_branch_prompt() { | |
echo " `git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\(\1\)\ /'`" | |
} | |
function git_prompt { | |
local __git_branch='`get_git_branch_prompt`' | |
export PS1="\@ \W\[\033[32m\]$__git_branch\[\033[00m\]\$ " | |
} | |
git_prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.time.TimeCategory | |
// create XmlHolder for request content | |
def holder = new com.eviware.soapui.support.XmlHolder( mockRequest.requestContent ) | |
// get arguments | |
def startDateStr = holder["//b:StartDate"] | |
def endDateStr = holder["//b:EndDate"] | |
log.info "start: " + startDateStr + " end:" + endDateStr |
NewerOlder