Skip to content

Instantly share code, notes, and snippets.

View maxov's full-sized avatar

Max Ovsiankin maxov

View GitHub Profile
$ sphinx-intl update-txconfig-resources --pot-dir ../build/locale --transifex-project-name sponge-docs | gist
Traceback (most recent call last):
File "/usr/local/bin/sphinx-intl", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/sphinx_intl/commands.py", line 576, in main
run(sys.argv[1:])
File "/usr/local/lib/python2.7/site-packages/sphinx_intl/commands.py", line 568, in run
commands[cmd](options)
File "/usr/local/lib/python2.7/site-packages/sphinx_intl/commands.py", line 157, in __call__
return self.function(**kwargs)
@maxov
maxov / -
Created December 31, 2014 23:07
html {
font-family: 'Lucida Grande';
font-size: 9pt;
background-color: #f7f7f7;
color: #000;
word-wrap: break-word;
margin: 0;
padding: 0;
}
@maxov
maxov / -
Created December 31, 2014 23:07
# All colors must be in the form of '#rrggbb' or '#rgb'.
# You cannot use color names.
log-view:
nickname-format: '%n'
scroller-highlight-color: '#f0f'
input-text:
font-family: 'Lucida Grande'
font-size: 13.0
background-color: '#fff'
@maxov
maxov / query.sql
Last active August 29, 2015 14:12
SELECT
"repo_namespace"."id",
"repo_namespace"."name",
"repo_repouser"."namespace_ptr_id",
"repo_repouser"."password",
"repo_repouser"."last_login",
"repo_repouser"."is_superuser",
"repo_repouser"."email",
"repo_repouser"."is_staff",
"repo_repouser"."is_active",
@maxov
maxov / perms.py
Created January 10, 2015 09:08
perms
from django.db.models import Q, F
from perms.spaces import QueryPermissionSpace
from repo.models import Project
space = QueryPermissionSpace()
@space.query_resolver('project.*')
def resolve_project_perms(perm, user):
return Project.objects.filter(
@maxov
maxov / -
Created January 16, 2015 16:17
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:javadoc/Users/max/proj/sponge/SpongeAPI/src/main/java/org/spongepowered/api/world/storage/WorldStorage.java:31: warning: no description for @return
* @return
^
/Users/max/proj/sponge/SpongeAPI/src/main/java/org/spongepowered/api/plugin/Plugin.java:45: warning: no @return
String id();
^
/Users/max/proj/sponge/SpongeAPI/src/main/java/org/spongepowered/api/plugin/Plugin.java:51: warning: no @return
@maxov
maxov / -
Created January 18, 2015 00:24
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/max/proj/sponge/Soak/Cli/build.gradle' line: 3
* What went wrong:
Error resolving plugin [id: 'com.github.hierynomus.license', version: '0.11.0']
> Plugin 'com.github.hierynomus.license' is already on the script classpath. Plugins on the script classpath cannot be applied in the plugins {} block. Add "apply plugin: 'com.github.hierynomus.license'" to the body of the script to use the plugin.
@maxov
maxov / messages.java
Last active August 29, 2015 14:13
message computation
// All lists are immutable
public ComputedMessage computeAll(@Nullable Message parent) {
Message self = null;
if (parent == null) {
self = this;
} else {
self = Messages.compute(parent, self);
}
@maxov
maxov / plugin.json
Last active August 29, 2015 14:15
soak dependency specification
{
"name": "my-plugin",
"owner": "gratimax",
"version": "1.0-SNAPSHOT",
"dependencies": [
["Lapis", "Commons", "1.0-SNAPSHOT"]
],
"maven": {
"repositories": {
"sponge": "https://repo.spongepowered.org/maven",
<!-- in .merge-messages after first button, before .js-details-container -->
<a data-url="github-mac://openRepo/https://github.com/SpongePowered/SpongeAPI?branch=feature%2Fexplosion-events" class="button desktop-app-action js-conduit-rewrite-url tooltipped tooltipped-s" aria-label="Check out this branch">
<span class="octicon octicon-device-desktop"></span>
</a>
<!-- in .discussion-sidebar after .partial-discussion-stats, before first .discussion-sidebar-item -->
<button class="minibutton primary" style="width: 100%">Pull Locally</button>
<!-- with icon -->
<button class="minibutton primary" style="width: 100%"><span class="octicon octicon-device-desktop"></span> Pull Locally</button>