Skip to content

Instantly share code, notes, and snippets.

View blizzarddreams's full-sized avatar
❄️
arctic fox

Blizzard blizzarddreams

❄️
arctic fox
  • Kentucky
  • 22:58 (UTC -04:00)
View GitHub Profile
func viewHandler(w http.ResponseWriter, r *http.Request) {
title := r.URL.Path[len("/view/"):]
p, _ := loadPage(title)
t, _ := template.ParseFiles("view.html")
t.Execute(w, p)
}
(('a'..'z').to_a - 'hello'.chars.to_a).empty?
from datetime import *
import time
import sys
while True:
date = datetime.now().strftime("%H:%M:%S")
sys.stdout.write(str(date)+'\r')
sys.stdout.flush()
time.sleep(1)
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int fahrenheit_to_celcius(int f) {
return (f-32)*5/9;
}
int main() {
printf("%i", fahrenheit_to_celcius(44));
package main
import (
"net/http"
// "html/template"
"github.com/russross/blackfriday"
)
func home(w http.ResponseWriter, r *http.Request) {
data := []byte("**Hello World**")
url = "http://play.pokemonshowdown.com/action.php"
if @pass.nil?
data = RestClient.get url, :act => 'getassertion', :userid => @name, :challengekeyid => m[2], :challenge => m[3]
ws.send("|/trn #{@name}, 0, #{data}")
else
data = RestClient.post url, :act => 'login', :name => @name, :pass => @pass, :challengekeyid => m[2], :challenge => m[3]
data = JSON.parse(data.split(']')[1])
ws.send("|/trn #{@name}, 0, #{data['assertion']}")
end
if (x) {
return x;
}
if (x)
{
return x;
}
C:\Users\Anthony\Documents\Projects\blizzywebsite>python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
385, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
354, in execute
django.setup()
require 'sinatra'
get '/' do
@text = params[:hmm]
@text.reverse!
erb :home
end
require 'sinatra'
get '/' do
#get textarea value
end