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 hashlib | |
| import json | |
| import logging | |
| import os | |
| import re | |
| import sys | |
| import tempfile | |
| from pathlib import Path | |
| from dotenv import load_dotenv |
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
| /** | |
| *Submitted for verification at Etherscan.io on 2018-06-12 | |
| */ | |
| pragma solidity ^0.4.13; | |
| library SafeMath { | |
| /** | |
| * @dev Multiplies two numbers, throws on overflow. |
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 UIKit | |
| private var INSColorPickerWindow: UIWindow? | |
| class INSColorPickerView: UIViewController { | |
| private var screenshotForCollectionViewAsImage: UIImage? | |
| private var completion: ((UIColor) -> Void)? | |
| private let penView = UIView() |
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
| using System; | |
| using System.Data; | |
| using System.IO; | |
| using NPOI.HSSF.UserModel; | |
| using NPOI.SS.UserModel; | |
| using NPOI.XSSF.UserModel; | |
| namespace MyNameSpace | |
| { | |
| public static class NPOIHelper |
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
| // this is the background code... | |
| // listen for our browerAction to be clicked | |
| chrome.browserAction.onClicked.addListener(function (tab) { | |
| // for the current tab, inject the "inject.js" file & execute it | |
| chrome.tabs.executeScript(tab.ib, { | |
| file: 'inject.js' | |
| }); | |
| }); |
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
| // https://stackoverflow.com/questions/21731044/is-there-a-way-to-attach-an-event-handler-to-the-list-of-running-processes-in-c | |
| // | |
| static void Main(string[] args) | |
| { | |
| var query = new EventQuery("SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance isa \"Win32_Process\""); | |
| using (var eventWatcher = new ManagementEventWatcher(query)) | |
| { | |
| eventWatcher.EventArrived += eventWatcher_EventArrived; | |
| eventWatcher.Start(); |
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
| namespace PushNotification | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| string filepath = "C://AppPushCertificates.p12"; | |
| string pwd = "your certificate passwords"; | |
| PushNotification pushNotification = new PushNotification(PushNotificationType.Distribution, filepath, pwd); | |
| PushNotificationPayload payload = new PushNotificationPayload(); |
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 <Foundation/Foundation.h> | |
| @interface RSACryptographic : NSObject | |
| - (void)loadPublicKeyFromFile:(NSString*)derFilePath; | |
| - (void)loadPublicKeyFromData:(NSData*)derData; | |
| - (void)loadPrivateKeyFromFile:(NSString*)p12FilePath password:(NSString*)p12Password; | |
| - (void)loadPrivateKeyFromData:(NSData*)p12Data password:(NSString*)p12Password; |
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 "ViewController.h" | |
| @interface ViewController ()<NSURLSessionDelegate> | |
| @end | |
| @implementation ViewController | |
| - (void)viewDidLoad { | |
| [super viewDidLoad]; |
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
| extension UIView { | |
| func getColourFromPoint(point:CGPoint) -> UIColor { | |
| let colorSpace:CGColorSpace = CGColorSpaceCreateDeviceRGB() | |
| let bitmapInfo = CGBitmapInfo(rawValue: CGImageAlphaInfo.premultipliedLast.rawValue) | |
| var pixelData:[UInt8] = [0, 0, 0, 0] | |
| let context = CGContext(data: &pixelData, width: 1, height: 1, bitsPerComponent: 8, bytesPerRow: 4, space: colorSpace, bitmapInfo: bitmapInfo.rawValue) | |
| context?.translateBy(x: -point.x, y: -point.y) | |
| if let _context = context { |
NewerOlder