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
| image: nikolaik/python-nodejs:latest | |
| stages: | |
| - install | |
| - test | |
| - deploy | |
| prodInstall: | |
| stage: install | |
| script: |
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
| %%[ | |
| SET @pl = "a|b|c|d|e" | |
| SET @prefArray = BuildRowSetFromString(@pl,"|") | |
| SET @rCount = RowCount(@prefArray) | |
| FOR @i = 1 TO @rCount DO | |
| SET @ddd = Field(Row(@prefArray, @i),1) | |
| ]%% | |
| %%=V(@ddd)=%% <br> | |
| %%[ | |
| NEXT @i |
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
| public func CVPixelBufferGetPixelFormatName(pixelBuffer: CVPixelBuffer) -> String { | |
| let p = CVPixelBufferGetPixelFormatType(pixelBuffer) | |
| switch p { | |
| case kCVPixelFormatType_1Monochrome: return "kCVPixelFormatType_1Monochrome" | |
| case kCVPixelFormatType_2Indexed: return "kCVPixelFormatType_2Indexed" | |
| case kCVPixelFormatType_4Indexed: return "kCVPixelFormatType_4Indexed" | |
| case kCVPixelFormatType_8Indexed: return "kCVPixelFormatType_8Indexed" | |
| case kCVPixelFormatType_1IndexedGray_WhiteIsZero: return "kCVPixelFormatType_1IndexedGray_WhiteIsZero" | |
| case kCVPixelFormatType_2IndexedGray_WhiteIsZero: return "kCVPixelFormatType_2IndexedGray_WhiteIsZero" | |
| case kCVPixelFormatType_4IndexedGray_WhiteIsZero: return "kCVPixelFormatType_4IndexedGray_WhiteIsZero" |
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
| //Usage | |
| lbl.attributedText = htmlToAttributedString ("html text") | |
| //Assign attributed string | |
| func htmlToAttributedString(string : String) -> NSAttributedString{ | |
| var attribStr = NSMutableAttributedString() | |
| do {//, allowLossyConversion: true | |
| attribStr = try NSMutableAttributedString(data: string.dataUsingEncoding(NSUnicodeStringEncoding)!, options: [ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType], documentAttributes: nil) | |
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
| from __future__ import absolute_import | |
| from __future__ import print_function | |
| import os | |
| import sys | |
| import pickle | |
| import console | |
| import editor | |
| import dropbox | |
| # I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder |
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
| # YOU NEED TO INSERT YOUR APP KEY AND SECRET BELOW! | |
| # Go to dropbox.com/developers/apps to create an app. | |
| from __future__ import absolute_import | |
| from __future__ import print_function | |
| app_key = 'YOUR_APP_KEY' | |
| app_secret = 'YOUR_APP_SECRET' | |
| import webbrowser | |
| import dropbox |
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
| import os | |
| import sys | |
| import pickle | |
| import console | |
| # I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder | |
| sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')] | |
| import dropboxlogin # this code can be found here https://gist.github.com/4034526 | |
| STATE_FILE = '.dropbox_state' |
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
| # YOU NEED TO INSERT YOUR APP KEY AND SECRET BELOW! | |
| # Go to dropbox.com/developers/apps to create an app. | |
| app_key = 'YOUR_APP_KEY' | |
| app_secret = 'YOUR_APP_SECRET' | |
| # access_type can be 'app_folder' or 'dropbox', depending on | |
| # how you registered your app. | |
| access_type = 'app_folder' |
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
| " VIM Configuration File | |
| " Description: Optimized for C/C++ development, but useful also for other things. | |
| " Author: Gerhard Gappmeier | |
| " | |
| " set UTF-8 encoding | |
| set enc=utf-8 | |
| set fenc=utf-8 | |
| set termencoding=utf-8 | |
| " disable vi compatibility (emulation of old bugs) |
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
| // Crop a UIImage to the specified cropRect | |
| public UIImage CropImage(UIImage image, RectangleF cropRect) | |
| { | |
| UIGraphics.BeginImageContextWithOptions(cropRect.Size, false, 0); | |
| var context = UIGraphics.GetCurrentContext(); | |
| context.TranslateCTM(0.0f, image.Size.Height); | |
| context.ScaleCTM(1.0f, -1.0f); | |
| context.DrawImage(new RectangleF(0, 0, image.Size.Width, image.Size.Height), image.CGImage); | |
| context.ClipToRect(cropRect); |
NewerOlder