This file contains hidden or 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
# set modifier to Super key | |
set $mod Mod4 | |
# workspaces | |
set $ws_chat 1: Chat | |
set $ws_web 2: Web | |
set $ws_code 3: Code | |
set $ws_misc 4: Misc | |
set $ws_fm 5: FM |
This file contains hidden or 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
$('form').on('analytics-event', function(event, data) { | |
// register Google AdWords conversion | |
var google_conversion_id = 0; | |
var google_conversion_label = ""; | |
image = new Image(1,1); | |
image.src = 'http://www.googleadservices.com/pagead/conversion/' + google_conversion_id + '/?label=' + google_conversion_label + '&script=0&guid=ON'; | |
}); |
This file contains hidden or 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
<?php | |
/** | |
* Simple CSS minifier. | |
* Copyright (c) Mladen Mijatov, Way2CU | |
*/ | |
// sample data | |
$data = <<<END |
This file contains hidden or 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 Class(parameter) { | |
var self = this; | |
self.some_variable = parameter; | |
/** | |
* Complete object initialization. | |
*/ | |
self._init = function() { | |
}; |
This file contains hidden or 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
var list = document.querySelectAll('a'); | |
function handle_click(event) { | |
event.preventDefault(); | |
for (var i=0, count=list.length; i<count; i++) { | |
var link = list[i]; | |
if (link === this) | |
continue; | |
link.classList.remove('active'); |
This file contains hidden or 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 bluetooth | |
socket = bluetooth.BluetoothSocket(bluetooth.RFCOMM) | |
socket.connect(('00:00:00:00:00:00', 1)) | |
data = socket.recv(4096) | |
while data: | |
lines = data.split('$') | |
data = lines[-1] + socket.recv(4096) |
This file contains hidden or 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 handle_load(article) { | |
var title = document.createElement('h1'); | |
var content = document.createElement('div'); | |
title.innerHtml = article.item.title; | |
content.innerHtml = article.item.content; | |
} | |
new Communicator('articles') | |
.on_load(handle_load) |
This file contains hidden or 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
# thanks to Jaap Karssenberg (github.com/jaap-karssenberg) | |
import gi | |
import ctypes | |
gi.require_version('Gtk', '3.0') | |
gi.require_version('GIRepository', '2.0') | |
from gi.repository import GIRepository, Gtk |