Skip to content

Instantly share code, notes, and snippets.

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

Blizzard blizzarddreams

❄️
arctic fox
  • Kentucky
  • 01:03 (UTC -04:00)
View GitHub Profile
import urllib.request
counter = 0
while True:
counter+=1
URL = "http://www.arso.gov.si/vreme/napovedi%20in%20podatki/radar_anim.gif"
urllib.request.retrieve(URL, "radars/radar_anim_%02d.gif" % counter)
time.sleep(3000)
import urllib.request
import os
import time
try:
os.mkdir('radar')
except WindowsError:
print("ok.")
while True:
package main
var namesMap := map[string]string{"Hello": "World","foo":"bar"}
var commands = map[string]func() {
"hello": hello,
}
func hello() string {
return "Hello World"
}
package main
func command(msg string) func() string {
return commandsMap[cmd]
}
var commandsMap = map[string]func() string{
"hello": hello,
}
package main
type Bot struct {
User string `json:"user"`
Nick string `json:"nick"`
Server string `json:"server"`
Port string `json:"port"`
Channels []string `json:"channels"`
C:\Users\Anthony\Documents\Projects\JackdawApp>rake db:migrate
== 20150216042249 AddDeviseToUsers: migrating =================================
-- change_table(:users)
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: no such table: users: ALTER TABLE "users" ADD "nick" varc
har DEFAULT '' NOT NULL
Tasks: TOP => db:migrate
new_user_session GET /users/sign_in(.:format) devise/sessions#n
ew
user_session POST /users/sign_in(.:format) devise/sessions#c
reate
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#d
estroy
user_password POST /users/password(.:format) devise/passwords#
create
new_user_password GET /users/password/new(.:format) devise/passwords#
new
$(document).ready(function() {
$(".thumbnail").draggable();
$("#trash").droppable({
drop: function(event, ui) {
alert(ui.data("image-id"));
/*$.ajax({
type: "POST",
url: "<%= link_to image_path
}) */
$(document).ready(function() {
$(".thumbnail").draggable();
$("#trash").droppable({
drop: function(event, ui) {
var id = ui.draggable.attr('id');
$.ajax({
type: "post",
data: {"_method": "delete"},
url: "/images/" + id,