This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN server | |
# on a Ubuntu or Debian instance. Tested with Ubuntu 14.04 & 12.04 and Debian 8. | |
# With minor modifications, this script *can also be used* on dedicated servers | |
# or any KVM- or XEN-based Virtual Private Server (VPS) from other providers. | |
# | |
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN | |
# YOUR AMAZON EC2 INSTANCE STARTS! | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LdapRequest | |
HOST = 'mail.example.com' | |
PORT = 636 | |
TREEBASE='DC=example.com,DC=com' | |
ATTRS=['mail', 'department', 'telephoneNumber', 'mobile'] | |
def initialize(username, password) | |
@ldap = Net::LDAP.new :host => HOST, | |
:port => PORT, | |
:encryption => :simple_tls, | |
:auth => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
#include "step.h" | |
#include "step_imp.h" | |
void init_context(char* CONTEXT_FILE_PATH, struct desc_set* set) | |
{ | |
FILE *fp; | |
char buff[1024]; | |
char* line; | |
struct status_step_context * context = set->context; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <errno.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <sys/wait.h> | |
#include <sys/stat.h> | |
pid_t child; | |
int childStatus; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mmc read <device num> addr blk# cnt | |
| | | | | | |
`-------+----------|---|----|-- disk2mem 从device-num中读取 blk# * 512 <-----> (blk# + cnt)*512 的数据到内存(地址以addr开头)中 | |
| | | | | |
`----------|---|----|-- mmc list | |
| | | | |
`---|----|-- memory start address | |
| | | |
`----|-- disk start block | |
| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# encoding: utf-8 | |
# | |
require 'rexml/document' | |
require 'erb' | |
=begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2008 The Android Open Source Project | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* * Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* * Redistributions in binary form must reproduce the above copyright |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gmailAppsDomain = ""; | |
function findGmailTab()( | |
Utils.tabs.search(/^https?:\/\/mail\.google\.com\/mail\/(?:[?#]|$)/)[0]); | |
function extractGmailAppsDomain(URL) { | |
// given a URL, will find the gmail apps domain part of it | |
if (gmailAppsDomain.length > 0) { | |
return gmailAppsDomain; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" | |
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | |
<head> | |
<title>Ubiquity Google reader tool</title> | |
</head> | |
<body> | |
<div id="google-reader" style="display: none;"> | |
<small>${tipsMessage}</small> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" | |
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | |
<head> | |
<title>Ubiquity Google bookmarks tool</title> | |
</head> | |
<body> | |
<div id="google-bookmarks-search" style="display: none;"> | |
<small>${tipsMessage}</small> |
NewerOlder