Skip to content

Instantly share code, notes, and snippets.

View Superbil's full-sized avatar
:shipit:
Working in Cloud

Superbil Superbil

:shipit:
Working in Cloud
View GitHub Profile
@Superbil
Superbil / gist:1087732
Created July 17, 2011 16:09
string copy
#include <stdio.h>
void printString(char *string)
{
int i;
for (i = 0; string[i] != '\0' ; i++) {
printf("%c",string[i]);
}
}
private IEnumerable<TreeNode> getAllFileTreeNode(TreeNodeCollection nodes)
{
foreach (TreeNode f in nodes)
{
if (f.Nodes.Count > 0)
{
foreach (TreeNode subNode in getAllFileTreeNode(f.Nodes))
yield return subNode;
}
yield return f;
using System;
namespace Test
{
class NullTest
{
static int? GetNullableInt()
{
return null;
}
@Superbil
Superbil / config_dropbox.sh
Last active April 8, 2020 00:13
Open another Dropbox account for mac, new version https://github.com/Superbil/Dropbox-AltStarter-app
# 建立一個新的.dropbox目錄,存另一個帳號的資料
# Make another .dropbox dir to save data
HOME=/Users/$USER/.dropbox-alt
/Applications/Dropbox.app/Contents/MacOS/Dropbox
@Superbil
Superbil / make-xcode-ignore.sh
Created September 25, 2010 11:40
auto make xcode ignore file script
#!/bin/bash
## call git init
git init
## make .gitignore
cat > .gitignore << EOF
# Mac OS X Finder and whatnot
.DS_Store
# no useful files
@Superbil
Superbil / chromium_update.sh
Created September 16, 2010 16:22
auto update chromium on osx
#!/bin/bash
# Chromium update script
# - by shad <[email protected]>
# - by superbil <[email protected]>
OS=mac
SITE=http://build.chromium.org/buildbot/snapshots/chromium-rel-
LATEST=$(wget -q -O - ${SITE}${OS}/LATEST)
INSTALL_DIR=/Applications
TARGET=Chromium
@Superbil
Superbil / mute.scpt
Created August 7, 2010 10:28
mute system and return mute
tell application "System Events"
if (output muted of (get volume settings)) is true then
set volume without output muted
else
set volume with output muted
end if
end tell
@Superbil
Superbil / userstyles.css
Created August 7, 2010 07:52
userstyle for twitter clinet
#side_base,
.elections-promotion,
#navigation,
#footer,
#header,
.content-bubble-arrow
{
display: none !important;
}
@Superbil
Superbil / gist:507824
Created August 4, 2010 08:07
simple css
<ul class="list">
<li class="film"><a href="search/label/film">Film</a></li>
<li class="theatre"><a href="search/label/film">Theatre</a></li>
<li class="music"><a href="search/label/film">Music</a></li>
<li class="lyrics"><a href="search/label/film">Lyrics Case</a></li>
<li class="quotes"><a href="search/label/film">Quotes。</a></li>
<li><img 135px width="135" src="http://farm4.static.flickr.com/3430/3378859683_329df186f2_m.jpg" width: /></li>
<li class="life"><a href="search/label/film">Life</a></li>
<li class="wonders"><a href="search/label/film">Wonders</a></li>
<li class="travel"><a href="search/label/film">Travel</a></li>
@Superbil
Superbil / Darwin
Last active September 5, 2015 14:24
git ignore file
# Mac OS X Finder and whatnot
.DS_Store
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes