Skip to content

Instantly share code, notes, and snippets.

View antonva's full-sized avatar

Anton Vilhelm Ásgeirsson antonva

  • Reykjavik
View GitHub Profile
def get_price():
url = "http://www.cryptocoincharts.info/v2/api/tradingPair/DOGE_BTC"
openUrl = urllib2.urlopen(url).read()
json_str = json.loads(openUrl)
price = json_str["price"]
return price
[options]
resize_grip = false
scroll_on_output = false
scroll_on_keystroke = true
audible_bell = false
visible_bell = false
mouse_autohide = false
allow_bold = true
dynamic_title = true
urgent_on_bell = true
#-*- coding: utf-8 -*-
# Copyright (c) 2013 Anton Vilhelm Ásgeirsson <anton@antonvilhelm.is>
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
#
import weechat as w
import re
# Registstration variables.
SCRIPT_NAME = "greentext"
SCRIPT_AUTHOR = "Anton Vilhelm Asgeirsson <anton@antonvilhelm.is>"
SCRIPT_VERSION = "0.0.1"
SCRIPT_LICENSE = "MULTIPASS"
SCRIPT_DESC = "Change messages starting with '>' to green text."
➜ csgodemo node server.js
++ Creating Demo File Stream...
++ Header: HL2DEMO
++ DEM File Version: 4
++ Network Protocol Version: 13150
++ Server Name: ESEA Colorado 274 - Cheat Free + Prizes - esea.net
++ Client Name: GOTV Demo
++ Map Name: de_train_ve
++ Game Directory: /csgo/
++ Playback Time: 0:25:39
>>> import re
>>> regex = re.compile(r"([^.]+)\\?(.*)")
>>> regex.match('Guardian\'s Boombox').groups()
("Guardian's Boombox", '')
>>>
@antonva
antonva / gist:7379533
Created November 8, 2013 23:56
arduino code for workning mouse.
// SerialMouse sketch
const int left_button = 2;
const int right_button = 4;
const int x_pin = 4; // analog pins for pots
const int y_pin = 5;
void setup()
{
Serial.begin(9600);
@antonva
antonva / gist:7379568
Created November 8, 2013 23:59
Músarkódi í python. (tharf bruteforce thar sem shittid er volatile(
import sys
import serial
import time
from Quartz.CoreGraphics import CGEventCreateMouseEvent
from Quartz.CoreGraphics import CGEventPost
from Quartz.CoreGraphics import kCGEventMouseMoved
from Quartz.CoreGraphics import kCGEventLeftMouseDown
from Quartz.CoreGraphics import kCGEventLeftMouseUp
from Quartz.CoreGraphics import kCGEventRightMouseDown
from Quartz.CoreGraphics import kCGEventRightMouseUp
@antonva
antonva / gist:7379513
Created November 8, 2013 23:53
Gistar fyrir into verkefni
http://www.youtube.com/watch?v=IsTl-U1STNM
http://www.youtube.com/watch?v=HXVjn8eKCwo&feature=youtu.be
! Simple URxvt Config
! Author: Anton Vilhelm Asgeirsson
!Xft settings
Xft.dpi: 96
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight