Skip to content

Instantly share code, notes, and snippets.

function isSystemUsingOverlayScrollers()
{
var inner = document.createElement('p'),
outer = document.createElement('div');
inner.style.width = "100%";
inner.style.height = "200px";
outer.style.position = "absolute";
@primalmotion
primalmotion / LPCrashReporter+Github.php
Created October 18, 2011 11:35
This file can be set as endpoint for LPCrashReported. It supports version, so it's better to use with my fork of LPKit
<?php
# reports.php
#
# Copyright (C) 2010 Antoine Mercadal <[email protected]>
# This file is part of ArchipelProject
# http://archipelproject.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
@import <Foundation/CPObject.j>
toto = function()
{
for(var i = 0; i < 10000; i++);
}
@implementation Util : CPObject
- (void)_updatePlaceholderState
{
var objectValue = [self objectValue];
if ((!objectValue || [objectValue count] === 0) && ![self hasThemeState:CPThemeStateEditing])
[self setThemeState:CPTextFieldStatePlaceholder];
else
[self unsetThemeState:CPTextFieldStatePlaceholder];
}
@primalmotion
primalmotion / gist:1253295
Created September 30, 2011 09:51
Archipel Beta 4 Changelog
var alert = [TNAlert alertWithMessage:@"Are you sure ?"
informative:@"Because this bad"
target:self
actions:[[@"Yes", @selector(performYes:)],
[@"Maybe", @selector(performMaybe:)],
[@"Cancel", nil]]];
[alert runModal];
@primalmotion
primalmotion / archipel-sendchatbytags.py
Created September 16, 2011 14:07
Command to send chat message by tags
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# archipel-tagcommands.py
#
# Copyright (C) 2010 Antoine Mercadal <[email protected]>
# This file is part of ArchipelProject
# http://archipelproject.org
#
# This program is free software: you can redistribute it and/or modify
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1070</int>
<string key="IBDocument.SystemVersion">11C55</string>
<string key="IBDocument.InterfaceBuilderVersion">1617</string>
<string key="IBDocument.AppKitVersion">1138.20</string>
<string key="IBDocument.HIToolboxVersion">567.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
import sublime, sublime_plugin
import os
from UserString import MutableString
class CappDoc(sublime_plugin.TextCommand):
def run(self, edit):
region = self.view.sel()[0]
selectedString = self.view.substr(region)
if selectedString == "" or " " in selectedString:
return
@primalmotion
primalmotion / gist:1185744
Created September 1, 2011 08:55
Sample script to communicate with hypervisor and ask for its VMs
# -*- coding: utf-8 -*-
#
# archipel-samplecommunication.py
#
# Copyright (C) 2010 Antoine Mercadal <[email protected]>
# This file is part of ArchipelProject
# http://archipelproject.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as