Skip to content

Instantly share code, notes, and snippets.

View Andygmb's full-sized avatar

Andy Andygmb

  • Amsterdam, Netherlands
View GitHub Profile
<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.2.js"></script>
</head>
<body>
<a href="/red/1"><button> Click me to turn red on</button></a>
<a href="/red/0"><button> Click me to turn red off</button></a>
<script>
$("button").on("click", function(e){
e.preventDefault()
<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.2.js"></script>
</head>
<body>
<a href="/red/1"><button> Click me to turn red on</button></a>
<a href="/red/0"><button> Click me to turn red off</button></a>
<script>
$("a").on("click", function(e){
e.preventDefault()
$("a").on("click", function(e){
e.preventDefault()
url = this.href
$.ajax({
url:url,
success:function(response){
if (response === "True") {
$(".circle").css("background-color", "green")
} else {
var circle = $(".circle")
$("a").on("click", function(e){
e.preventDefault()
var url = this.href
$.ajax({
url:url,
success:function(response){
if (response === "True") {
def winner(votes):
return max(votes, key = votes.count)
winner([1,1,2,2,2,2,2,3])
>>> 2
CoordMode, Mouse, Screen
ICON_NAMES := "|agility|construction|cooking|crafting|farming|firemaking|fishing|fletching|herblore|hunter|magic|mining|prayer|ranged|runecrafting|slayer|smithing|summoning|thieving|woodcutting"
StringSplit, ICON_NAMES, ICON_NAMES, |
PTOKEN := Gdip_Startup()
PAGILITY := Gdip_CreateBitmapFromFile("agility.gif")
PCONSTRUCTION := Gdip_CreateBitmapFromFile("construction.gif")
import win32gui
import win32ui
from ctypes import windll
from PIL import Image
def get_hwnd_from_string(hwnd_string):
hwnd = win32gui.FindWindowEx(None, 0, None, hwnd_string)
return hwnd
def screengrab(hwnd):
@Andygmb
Andygmb / todo
Last active August 29, 2015 14:16
DONE * Suggestion box below message the moderators
DONE * Make credits dropdown
DONE * fix flair selection panel for linkflair
DONE * Donation box https://slack-files.com/files-tmb/T03A5T438-F03NYV8M4-6adaa5dc47/subreddit_design_version_3_-_banner_720.png
DONE * flair indicator before hover https://slack-files.com/files-tmb/T03A5T438-F03P15PS5-3a818745b9/flair4_360.png
[](#cal)
> Event| Game| Date | Time (UTC) |
>----|----|----|-----
>[Operation Nidalap](#link) | Arma 3 | 15 Jan| 20:00 |
>Public Event | Arma 3 | 16 Jan | 11:00
>Desert Storm | BF3 | 16 Jan | 09:00
>LongName Example | Arma 3 | 18 Jan | 20:00
>Rush Hour | Arma 3 | 20 Jan | 20:00
[](#endcal)
[](#cal)
> Event| Game| Date | Time (UTC) |
>:----:|----:|----:|-----:
>[Operation Red Fog](http://www.reddit.com/r/ProjectSports/comments/2z1dlr/test_event/)|ARMA 3|[20 Mar](https://www.google.com/calendar/event?eid=MW52MmkydjEycXNjdjNmbWU3NnBqdHIzZmcgcHJvamVjdGF3ZXNvbWVnYW1pbmdAbQ)|[20:00](https://www.google.com/calendar/event?eid=MW52MmkydjEycXNjdjNmbWU3NnBqdHIzZmcgcHJvamVjdGF3ZXNvbWVnYW1pbmdAbQ)|#### Updated 2015-03-16 17:02 UTC
[](#endcal)