Skip to content

Instantly share code, notes, and snippets.

View jsam's full-sized avatar
🦁

sam jsam

🦁
View GitHub Profile
5/30 21:18:50.395 SWING_DAMAGE,Player-4620-000BA4F4,"Roguesnots-ClassicBeta",0x518,0x0,Creature-0-4615-0-1196-1513-0000702C42,"Mangy Duskbat",0xa28,0x0,Player-4620-000BA4F4,0000000000000000,117,100,45,0,104,3,26,100,0,1972.62,1495.29,1420,5.3529,1,4,4,-1,1,0,0,0,nil,nil,nil
(combatlog.Event) {
Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,
Name: (string) (len=12) "SWING_DAMAGE",
Data: (combatlog.SwingDamage) {
Common: (combatlog.Common) {
Source: (combatlog.Unit) {
ID: (string) (len=20) "Player-4620-000BA4F4",
Name: (string) (len=28) "Roguesnots-ClassicBeta",
Flags: (combatlog.UnitFlags) 1304,
Flag2: (uint64) 0
@jsam
jsam / gist:e23044bfd00ec712f1a3b997b7f49a49
Created May 23, 2019 13:46
Zenodo default response
{"conceptdoi": "10.5281/zenodo.597964", "conceptrecid": "597964", "created": "2019-05-02T17:42:23.865691+00:00", "doi": "10.5281/zenodo.2658634", "files": [{"bucket": "e3afe60a-0780-4e73-8b66-6826d1c48a61", "checksum": "md5:15da253c243022e510c0ad4801cbda43", "key": "quantling/pyndl-v0.6.4.zip", "links": {"self": "https://zenodo.org/api/files/e3afe60a-0780-4e73-8b66-6826d1c48a61/quantling/pyndl-v0.6.4.zip"}, "size": 498099, "type": "zip"}], "id": 2658634, "links": {"badge": "https://zenodo.org/badge/doi/10.5281/zenodo.2658634.svg", "bucket": "https://zenodo.org/api/files/e3afe60a-0780-4e73-8b66-6826d1c48a61", "conceptbadge": "https://zenodo.org/badge/doi/10.5281/zenodo.597964.svg", "conceptdoi": "https://doi.org/10.5281/zenodo.597964", "doi": "https://doi.org/10.5281/zenodo.2658634", "html": "https://zenodo.org/record/2658634", "latest": "https://zenodo.org/api/records/2658634", "latest_html": "https://zenodo.org/record/2658634", "self": "https://zenodo.org/api/records/2658634"}, "metadata": {"access_right": "
@jsam
jsam / fileioexamples.scala
Created January 14, 2019 22:06
FileIO examples
package storage
import java.io.{File, FileOutputStream, PrintWriter}
trait JsonOperations {
/**
* Checks if directory path exists or it has to be created
* @param file
* @return Boolean - true if directory path exists or creation or such path was successful, false otherwise

Symphony of Software Development: Practical Approach

Course Materials

  • Code (step by step)
  • Additional challenges to extend
  • Handouts
  • Videos

Course objectives

@jsam
jsam / dpgo.md
Created August 31, 2017 07:23
dpgo

Design patterns with Go

Course Materials

  • Handouts / Worksheets
  • Slides
  • Code Examples
  • Videos

Course objectives

@jsam
jsam / gist:24e3763fe4912ddb5c3a0fe411002f21
Created July 18, 2017 08:41
fix corrupt zsh_history
mv .zsh_history .zsh_history_bad
strings .zsh_history_bad > .zsh_history
fc -R .zsh_history
(mbot3) ➜ Poker git:(master) ✗ python3 main.py
This is a testversion and error messages will appear here. The user interface has opened in a separate window.
Traceback (most recent call last):
File "/Users/sam/CritFactory/Poker/tools/mongo_manager.py", line 138, in read_strategy
self.selected_strategy = cursor.next()
File "/Users/sam/virtualenvs/mbot3/lib/python3.6/site-packages/pymongo/cursor.py", line 1114, in next
if len(self.__data) or self._refresh():
File "/Users/sam/virtualenvs/mbot3/lib/python3.6/site-packages/pymongo/cursor.py", line 1036, in _refresh
self.__collation))
File "/Users/sam/virtualenvs/mbot3/lib/python3.6/site-packages/pymongo/cursor.py", line 873, in __send_message
@jsam
jsam / gist:d5636d7aaafc9da9c904
Created January 30, 2016 01:34
ELK stackfile
elasticsearch:
image: elasticsearch:1.7
ports:
- "9200:9200"
- "9300:9300"
kibana:
image: kibana:4.1
ports:
- "5601:5601"
links:
@jsam
jsam / gist:d5833c74e8819f8ce889
Created January 27, 2016 20:34
Enable Android development for OnePlus One
Add:
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6764", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6765", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
to /lib/udev/rules.d/69-libmtp.rules
and restart udev.