IMPORTANT!

Snipt is going open source. We've toyed with this idea for quite a while, and have finally decided it's the right way to move forward.

A few things:
  • The entire Snipt source code will be released on GitHub under the 3-clause BSD License on Friday, September 10th.
  • While we'd like to think we're perfect, we realize we're only human. By open sourcing the software that runs this website, certain bugs or security flaws may be discovered that could compromise the privacy of your snipts.
  • Only the Lion Burger team will be able to push commits to the Snipt.net site. Contributors should send a pull request to add new features or submit patches.
  • By using this site, you agree not to be too angry or take any legal action against Lion Burger should this whole thing go up in flames some day.
  • Follow us on Twitter for updates.
I agree, close this message
Sign up to create your own snipts, or login.

Latest 100 public snipts » muanis's snipts The latest snipts from muanis.

showing 1-8 of 8 snipts
  • list all fonts on iphoe
    	// List all fonts on iPhone
    		NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]];
    		NSArray *fontNames;
    		NSInteger indFamily, indFont;
    		for (indFamily=0; indFamily<[familyNames count]; ++indFamily)
    		{
    			NSLog(@"Family name: %@", [familyNames objectAtIndex:indFamily]);
    			fontNames = [[NSArray alloc] initWithArray:
    						 [UIFont fontNamesForFamilyName:
    						  [familyNames objectAtIndex:indFamily]]];
    			for (indFont=0; indFont<[fontNames count]; ++indFont)
    			{
    				NSLog(@"    Font name: %@", [fontNames objectAtIndex:indFont]);
    			}
    			[fontNames release];
    		}
    		[familyNames release];
    

    copy | embed

    0 comments - tagged in  posted by muanis on Mar 29, 2010 at 11:05 a.m. EDT
  • Highlight 404 on django runserver patch
    Index: django/core/servers/basehttp.py
    ===================================================================
    --- django/core/servers/basehttp.py	(revision 11655)
    +++ django/core/servers/basehttp.py	(working copy)
    @@ -608,7 +608,10 @@
             # Don't bother logging requests for admin images or the favicon.
             if self.path.startswith(self.admin_media_prefix) or self.path == '/favicon.ico':
                 return
    -        sys.stderr.write("[%s] %s\n" % (self.log_date_time_string(), format % args))
    +        if args[1] == '404':
    +            sys.stderr.write("\033[31m[%s] %s\033[0m\n" % (self.log_date_time_string(), format % args))
    +        else:
    +            sys.stderr.write("[%s] %s\n" % (self.log_date_time_string(), format % args))
     
     class AdminMediaHandler(object):
         """
    

    copy | embed

    0 comments - tagged in  posted by muanis on Jan 26, 2010 at 1:38 p.m. EST
  • Join pdf files in one file
    # glue a bunch of pdf files in one file
    # tip from fmeyer
    texexec --pdfarrange --result all.pdf `ls *.pdf`
    

    copy | embed

    0 comments - tagged in  posted by muanis on Sep 11, 2009 at 12:53 p.m. EDT
  • Find files with one name or another
    find /usr/src -not \( -name "*,v" -o -name ".*,v" \) '{}' \; -print 
    

    copy | embed

    0 comments - tagged in  posted by muanis on Jun 23, 2009 at 11:28 a.m. EDT
  • mirror website with wget
    mkdir -p /var/www/mirror
    cd /var/www/mirror
    wget --mirror –w 2 –p --html-extension –-convert-links –P /var/www/mirror/site http://www.yourdomain.com
    

    copy | embed

    0 comments - tagged in  posted by muanis on Jun 07, 2009 at 11:52 a.m. EDT
  • Extract Source from RPM
    mkdir test
    cd test
    wget http://mysite.com/files/packages/appp-1.0.x86_64.rpm
    rpm2cpio appp-1.0.x86_64.rpm | cpio -idmv
    

    copy | embed

    0 comments - tagged in  posted by muanis on May 07, 2009 at 5:20 p.m. EDT
  • Finding the working dir of the process running on a specific port
    # first grep netstat for the desired port
    
    netstat -anp | grep 8161
    
    # after get the port number wich will be in the following format
    # tcp .... LISTEN 14826/java
    
    pwdx 14826
    
    # there you will go, the output shows something like
    # 14826: /usr/local/httpd
    

    copy | embed

    0 comments - tagged in  posted by muanis on Apr 26, 2009 at 12:25 p.m. EDT
  • Configuring username and email on git
    # on ~/.gitconfig
    
    [user]
        name = First Last
        email = my@email.com
    

    copy | embed

    0 comments - tagged in  posted by muanis on Apr 24, 2009 at 12:28 p.m. EDT
Sign up to create your own snipts, or login.