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
/* Pseudo code */ | |
function buzz | |
{ | |
print_number = false | |
loop i from 1 to 100 | |
{ | |
print_number = true |
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
/** | |
* formuploader.js via callbackhell.com | |
*/ | |
function formSubmit(submitEvent) { | |
/* Get value from input field */ | |
var name = document.querySelector('input').value; | |
/* Send a request with postResponse() as a callback */ |
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
############################################################################## | |
#### #### | |
#### HMA VPN Servers #### | |
#### Location, IP address and response time (ms) #### | |
#### #### | |
############################################################################## | |
--- USA --- | |
New York, Manhattan (LOC1 S3) 173.234.233.226 125 ms | |
New York, Manhattan (LOC1 S4) 173.208.45.130 125 ms |
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 httplib, sys, urllib | |
from datetime import date, datetime, strftime | |
from screenutils import list_screens, Screen | |
def push_message(token, key, msg=""): | |
""" | |
Send a notification via Pushover API | |
This function uses Python 2. For Python 3 replace | |
httplib with http.client and urlencode with urllib.parse | |
""" |
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/python | |
# -*- coding: utf-8 -*- | |
############################################################################## | |
# # | |
# Lookup telemarketers from the blacklist # | |
# By: Niko Heikkilä, 2013 under GNU GPLv3 # | |
# http://www.gnu.org/licenses/gpl.html # | |
# # | |
# Blacklist provided by Amigazone.fi and may change without prior notice. # |
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
"""Module docstring | |
This is a placeholder for a long usage message. | |
""" | |
import sys | |
import getopt | |
def process(arg): |
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 bash | |
# FizzBuzz | |
# | |
# Take and print numbers between 1 and 100. | |
# When a number is divisible by 3, print "Fizz". | |
# When it is divisible by 5, print "Buzz". | |
# When it is divisible both by 5 and 3, print "FizzBuzz". | |
function isDivisibleBy |
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
# This is the configurationfile for DOSBox 0.74. (Please use the latest version of DOSBox) | |
# Lines starting with a # are commentlines and are ignored by DOSBox. | |
# They are used to (briefly) document the effect of each option. | |
[sdl] | |
# fullscreen: Start dosbox directly in fullscreen. (Press ALT-Enter to go back) | |
# fulldouble: Use double buffering in fullscreen. It can reduce screen flickering, but it can also result in a slow DOSBox. | |
# fullresolution: What resolution to use for fullscreen: original or fixed size (e.g. 1024x768). | |
# Using your monitor's native resolution with aspect=true might give the best results. | |
# If you end up with small window on a large screen, try an output different from surface. |
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
# Bot nickname on IRC channels | |
nick: 'pyfibot' | |
# Host identifiers for admin privileges | |
# Format: nick!user@example.com | |
admins: | |
- 'nick!user@example.com' | |
- '*!user@*.example.com' | |
# List of IRC networks for bot to join |
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 -eu | |
# | |
# build.sh | |
# | |
# Builds the development version WeeChat with CMake | |
# Place this script in the build directory of WeeChat | |
# @author Niko Heikkilä <yo@nikoheikkila.com> | |
# Paths | |
ROOTDIR=$HOME/weechat |