Skip to content

Instantly share code, notes, and snippets.

@stas
stas / jquery.cleditor.pastecode.js
Created February 21, 2011 16:16
CLEditor pastecode (pre/code) plugin
// Just append `pastecode` to your controls
(function($) {
$.cleditor.buttons.pastecode = {
name: "pastecode",
image: "",
title: "Code",
command: "inserthtml",
popupName: "pastecode",
popupClass: "cleditorPrompt",
popupContent: "Paste the code:<br /><textarea cols='40' rows='3'></textarea><br /><input type='button' value='Ok' />",
@stas
stas / cw_hacks.php
Created February 13, 2011 14:21
New Courseware hack to move nav_options elsewhere
<?php
/*
Plugin Name: Hide Courseware nav option and move them elsewhere...
Author: stas
*/
class CW_Hacks {
public static $hide = false;
public static $options = array();
@stas
stas / cw_hacks.php
Created February 11, 2011 16:49
Courseware hacks
<?php
/*
Plugin Name: Hide Courseware option and make group admins teacher
Author: stas
*/
function cw_hide_group_profilegroup( $current_group ){
// Check if Courseware is enabled
if( !class_exists( 'BPSP_Roles' ) )
return $current_group;
@stas
stas / gist:664515
Created November 5, 2010 17:46
LFC output log
Checking main.lang ...
Checking line: 1
Checking line: 2
Checking line: 3
Checking line: 4
Checking line: 5
Checking line: 6
Checking line: 7
Checking line: 8
Checking line: 9
Index: /home/stas/Documente/www/wordpress/wp-includes/class.wp-scripts.php
===================================================================
--- class.wp-scripts.php (revision 15473)
+++ class.wp-scripts.php (working copy)
@@ -60,8 +60,14 @@
$after = $val;
continue;
}
- $data .= "$eol\t$var: \"" . esc_js( $val ) . '"';
- $eol = ",\n";
--- alpine-1.0+dfsg.orig/imap/src/c-client/mail.h
+++ alpine-1.0+dfsg/imap/src/c-client/mail.h
@@ -857,6 +857,7 @@
unsigned int spare7 : 1; /* seventh spare bit */
unsigned int spare8 : 1; /* eighth spare bit */
void *sparep; /* spare pointer */
+ char *maildirp; /* for the Maildir driver */
unsigned long user_flags; /* user-assignable flags */
} MESSAGECACHE;

Indexul cărților

  • Apache 2, Pocket Reference

    Andrew Ford 2008 Pagina oficială

  • Rails, Pocket Reference

    Eric Berry 2008 [Pagina oficială][2]

import os
import yaml
import urllib2
from facebook.webappfb import FacebookCanvasHandler, FacebookRequestHandler
class CronPage(FacebookRequestHandler):
def get(self):
self.canvas()
def post(self):
/**
* Bubble sort, insertion sort and selective sort.
* FA lab from 2nd March 2010
* Stas Suscov <[email protected]>
*/
#include <stdio.h>
#include <stdlib.h>
double attrs; // stored attributions