This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <windows.h> | |
int main() | |
{ | |
int chk; | |
while(1) | |
{ | |
Sleep(1); |
This file contains hidden or 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 <iostream> | |
#include <vector> | |
#include <string> | |
using namespace std; | |
void split(string source, string delim, vector<string>& result) | |
{ | |
string tmp; | |
size_t now=-1, next=-1; |
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
import string | |
import sys | |
from random import Random | |
if( len(sys.argv) > 1 ): | |
passwd_len = int(sys.argv[1]) | |
else: |
This file contains hidden or 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 | |
chroot_bin="/tmp/chroot/bin/" | |
chroot_lib="/tmp/chroot/lib/" | |
cmd_list="/bin/bash \ | |
/bin/ls \ | |
/bin/cp \ | |
/bin/mkdir \ | |
/bin/mv \ |
This file contains hidden or 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
# two line prompt (show git branch) | |
PS1='\n\[\033[01;30m\]┌[\[\033[00m\]' | |
PS1+='${debian_chroot:+($debian_chroot)}' | |
PS1+='\[\033[01;32m\]\u\[\033[00m\]@\h' | |
PS1+='\[\033[01;30m\]]\[\033[00m\]:' | |
PS1+='\[\033[01;33m\]\w\[\033[00m\]' | |
PS1+='\[\033[01;34m\]$(__git_ps1)\[\033[00m\]' | |
PS1+='\n\[\033[01;30m\]└─\[\033[00m\]\$ ' | |
# For colourful man pages (CLUG-Wiki style) |
This file contains hidden or 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
<!-- $Id: summary.xsl 1958 2009-11-16 03:28:50Z boudreat $ --> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:output method="html" indent="yes"/> | |
<xsl:decimal-format decimal-separator="." grouping-separator="," /> | |
<xsl:template match="contestStandings"> | |
<html> | |
<head> | |
<title> | |
計分板 - <xsl:value-of select="/contestStandings/standingsHeader/@title"/> | |
</title> |
This file contains hidden or 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/bash | |
passwd_name=test.passwd | |
home_root=/tmp | |
touch $home_root/$passwd_name | |
while read user_info | |
do | |
name=$(echo $user_info | awk '{print $1}') |
This file contains hidden or 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
x = 1 | |
for i in range(1, 101): | |
x = x * i | |
print x | |
# OUT: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 | |
#or | |
import math |
This file contains hidden or 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
# 關閉啟動訊息。 | |
startup_message off | |
# 加入狀態列。 | |
caption always "%{=u .r} %-w%<%{=ub .Y}%n %t%{=u .r}%+w " | |
hardstatus alwaysignore | |
hardstatus alwayslastline "%{= .K} [%l]%<%=%{= .Y}$USER%{= .R}@%H %=%{= .m} %Y/%m/%d%{= .M} %0c " | |
# 將預設編碼設為 UTF-8。 | |
defutf8 on |