Skip to content

Instantly share code, notes, and snippets.

View goosmurf's full-sized avatar

Yun Huang Yong goosmurf

View GitHub Profile
<html>
<head>
<!-- Google Analytics -->
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-457690-7', 'auto');
//ga('set', 'transport', 'beacon');
ga('send', 'pageview');
// This is correct
@goosmurf
goosmurf / exif_date.py
Created June 29, 2019 09:42 — forked from ikoblik/exif_date.py
Python script to update image creation and modification dates to the EXIF date.
#!/usr/bin/env python
"""A simple utility to restore file creation and modification
dates back to their original values from EXIF.
This script requires exif module to be installed or the exif
command line utility to be in the path.
To function correctly under windows this script needs win32file and
win32con modules. Otherwise it will not be able to restore the creation
sv_cheats 1
bind "KP_INS" "stopdemo"
bind "KP_END" "demo_timescale 1"
bind "KP_DOWNARROW" "demo_timescale 2"
bind "KP_PGDN" "demo_timescale 4"
bind "KP_LEFTARROW" "demo_timescale 8"
bind "KP_5" "demo_timescale 16"
bind "KP_RIGHTARROW" "demo_timescale 24"
bind "KP_HOME" "demo_pause"
hostname: smurfy MvM #4 - Halloween 24x7 Wave 666
version : 1734532/24 5287 secure
udp/ip : 125.63.51.145:27055 (public ip: 125.63.51.145)
account : logged in
map : mvm_coaltown_event at: 0 x, 0 y, 0 z
players : 32 (32 max)
# userid name uniqueid connected ping loss state adr
# 36 "Giant Charged Soldier" BOT active
# 76 "Random Eyeball" STEAM_0:0:41089102 04:08 84 0 active xxx:27005
> db.t.remove()
> db.t.insert( { players: [ {player_name: "m", player_position: 3}, {player_name: "blah", player_position: 3} ] } )
> db.t.insert( { players: [ {player_name: "another", player_position: 3}, {player_name: "m", player_position: 5} ] } )
> db.t.find( { "players": { player_name: "m", "player_position": 3 }} )
{ "_id" : ObjectId("4b4eaf902976dc62f4b0f9de"), "players" : [
{
"player_name" : "m",
"player_position" : 3
},
{
#!/usr/bin/env ruby
require 'rubygems'
require 'beanstalk-client'
JOB_SIZE = 64000
beanstalk = Beanstalk::Connection.new('127.0.0.1:11300')
job_data = 'x' * JOB_SIZE
#!/usr/bin/env ruby
require 'pp'
require 'rubygems'
require 'mongo'
db = XGen::Mongo::Driver::Mongo.new("localhost").db("test")
original = db.collection("original")
original.remove
original.insert( { "test" => 1 } )
Copyright (c) 2005-2007 Thomas Uehlinger
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
#!/usr/bin/env ruby
f = File.open("test.file", "w")
f.write("blah\n")
f = nil
#ObjectSpace.garbage_collect
puts File.readlines("test.file")
module LionO
class Test
end
describe Test do
def myclass
self.class
end
it "should print the class" do