Skip to content

Instantly share code, notes, and snippets.

@olivertappin
olivertappin / create-large-file.sh
Last active May 25, 2021
Create a large file for testing
View create-large-file.sh
# Please note, the commands below will create unreadable files and should be
# used for testing file size only. If you're looking for something that has
# lines in it, use /dev/urandom instead of /dev/zero. You'll then be able to
# read the number of lines in that file using `wc -l large-file.1mb.txt`
# Create a 1MB file
dd if=/dev/zero of=large-file-1mb.txt count=1024 bs=1024
# Create a 10MB file
dd if=/dev/zero of=large-file-10mb.txt count=1024 bs=10240
@dolpen
dolpen / splatoon_jsons.md
Last active Feb 8, 2016
裏イカ研究所
View splatoon_jsons.md

イカの情報をなんとかしてゲーム外から参照したい

  • イカの情報は、公式サイトへの情報反映用に一部がS3にjson形式で置いてあって、人間ががんばれば読めるようになっている
  • S3のベースURLは http://s3-ap-northeast-1.amazonaws.com/splatoon-data.nintendo.net/ である

現在分かっているもの

stages_info.json

以下について、現ターム(4時間のアレ)と過去2ターム前までの情報が参照可能

View gist:9955535
- devise_for module_name
- Devise::Mapping
- @scoped_path = options[:as] ? "#{options[:as]}/#{name}" : name.to_s
- @class_name = (options[:class_name] || name.to_s.classify).to_s
```ruby
# Devise::ConfirmationsController#show
def show
self.resource = resource_class.confirm_by_token(params[:confirmation_token])
@sgur
sgur / neosnippet_completer.py
Created Jun 18, 2013
neosnippet_completer.py
View neosnippet_completer.py
#!/usr/bin/env python
#
# Copyright (C) 2013 Stanislav Golovanov <stgolovanov@gmail.com>
# Strahinja Val Markovic <val@markovic.io>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or