Skip to content

Instantly share code, notes, and snippets.

View NatuMyers's full-sized avatar
🎯
Focusing

Natu Myers NatuMyers

🎯
Focusing
View GitHub Profile
@NatuMyers
NatuMyers / gist:374f3457915d7b35f4d1
Created November 27, 2015 18:28 — forked from hamzasood/gist:02e6e87835a17f4e1b9e
Apple Pencil 3D Touch
#import <UIKit/UIKit.h>
#import <objc/runtime.h>
// Hook with ObjC runtime functions
%config(generator=internal)
// New methods created below
@interface UIGestureRecognizer ()
+ (void)hs_beginForcingAllNewGestureRecognizersToAllowPencilInput;
+ (void)hs_endForcingAllNewGestureRecognizersToAllowPencilInput;
@NatuMyers
NatuMyers / getting-started.md
Created October 12, 2016 23:32 — forked from dwayne/getting-started.md
Django Notes (Python 3.5.1 and Django 1.9.x)

Getting Started

Install Python, follow the steps here.

Steps I take when beginning a new Django project.

$ mkdir [project_name]_project
$ cd [project_name]_project
@NatuMyers
NatuMyers / MyEthBank.sol
Created February 20, 2018 00:55 — forked from anonymous/MyEthBank.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.20+commit.3155dd80.js&optimize=false&gist=
// Freestartupkits.com
pragma solidity ^0.4.11;
contract MyEthBank {
mapping (address => uint) private balances;
address owner;
uint constant totalSupply = 10**4;
function MyEthBank() public payable {
balances[msg.sender] = totalSupply;
@NatuMyers
NatuMyers / development.ini
Created February 22, 2018 01:14
CKAN development.ini Sample File
#
# CKAN - Pylons configuration
#
# These are some of the configuration options available for your CKAN
# instance. Check the documentation in 'doc/configuration.rst' or at the
# following URL for a description of what they do and the full list of
# available options:
#
# http://docs.ckan.org/en/latest/maintaining/configuration.html
#
@NatuMyers
NatuMyers / jetty.txt
Created February 22, 2018 01:23
Jetty File Sample
# Defaults for jetty see /etc/init.d/jetty for more
# change to 0 to allow Jetty to start
NO_START=0
# change to 'no' or uncomment to use the default setting in /etc/default/rcS
VERBOSE=yes
# Run Jetty as this user ID (default: jetty)
# Set this to an empty string to prevent Jetty from starting automatically
@NatuMyers
NatuMyers / gist:862b9ae0c02f89bb965ed2e97e402863
Created February 24, 2018 04:55
Setup CKAN Commands (Prior to Postgres) (Ubuntu 14.01)
sudo apt-get update && sudo apt-get install -y nginx apache2 libapache2-mod-wsgi libpq5 redis-server git-core && wget http://packaging.ckan.org/python-ckan_2.6-trusty_amd64.deb && sudo dpkg -i python-ckan_2.6-trusty_amd64.deb && service apache2 reload && sudo apt-get install -y postgresql && sudo -u postgres psql -l
using Microsoft.Quantum.Simulation.Core;
using Microsoft.Quantum.Simulation.Simulators;
namespace Quantum.HelloQ
{
  class Driver
  {
    static void Main(string[] args)
    {
    }
  }
namespace Quantum.HelloQ
{
  open Microsoft.Quantum.Primitive;
  open Microsoft.Quantum.Canon;
  operation Operation () : ()
  {
    body
    {
    }
  }
namespace Quantum.HelloQ
{
    // Import Quantum.Primitive
    open Microsoft.Quantum.Primitive;
    // Create an operation that adds two int and returns a total int
    operation Add (a : Int, b : Int): (Int)
    {
        body
        {
            return (a + b);
using System;
using Microsoft.Quantum.Simulation.Core;
using Microsoft.Quantum.Simulation.Simulators;
namespace Quantum.HelloQ
{
    class Driver
    {
        static void Main(string[] args)
        {
            using (var sim = new QuantumSimulator())