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.DirectoryServices.AccountManagement; | |
try | |
{ | |
string adGroupName = "ACTIVE_DIR_GROUP_NAME"; | |
string userAccount = "USER_ACCOUNT_NAME" | |
using (System.Web.Hosting.HostingEnvironment.Impersonate()) | |
{ | |
PrincipalContext ctx = new PrincipalContext(ContextType.Domain); | |
GroupPrincipal permissionGroup = GroupPrincipal.FindByIdentity(ctx, adGroupName); |
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
Temp/ | |
Library/ | |
obj/ | |
*.svd | |
!Library/*.asset | |
!Library/AssetImportState | |
!Library/AssetVersioning.db | |
!Library/BuildPlayer.prefs | |
!Library/ScriptMapper |
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 UnityEngine; | |
using System.Collections; | |
public class CameraController : MonoBehaviour { | |
Vector3 worldUp=new Vector3(0f, 0f, 0f); | |
public GameObject target; | |
public int CameraMode = 1; | |
void 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
/* | |
Add this in main Controller. It bases difficulty on p1Points but we can change this method to | |
set difficulty however we want. | |
*/ | |
public int Difficulty { | |
get { | |
return p1Points>1?p1Points:1; | |
} | |
} |
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 random | |
import base64 | |
import zlib | |
random_ids = [''.join([random.choice(string.ascii_lowercase) for x in range(8)]) for n in range(1000)] | |
long_string = ','.join(random_ids) | |
b64_string = base64.urlsafe_b64encode(long_string) |
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
{ | |
// Path to the jslint jar. | |
// Leave blank to use bundled jar. | |
"jslint_jar": "", | |
// Options pass to jslint. | |
"jslint_options": "--node --browser --white --sloppy --nomen --undef --unparam --vars", | |
// Ignore errors, regex. | |
"ignore_errors": |
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
git rev-parse HEAD |
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 sys | |
import __main__ | |
class CLIUtility(object): | |
''' | |
A little helper for writing CLI tools. | |
Example: myclitool.py: | |
>>> cli = CLIUtility() |
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
logger = logging.getLogger() | |
stream_handler = logging.StreamHandler() | |
stream_handler.setLevel(logging.DEBUG) | |
stream_handler.setFormatter(logging.Formatter('%(asctime)s - %(message)s')) | |
logger.addHandler(stream_handler) |
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 pysmi | |
output_fields = ['stock_number', 'item_key'] | |
inventory = pysmi.connect_inventory() | |
results = inventory.get_inventory(output_fields=["item_key"], dealer_id=56, stock_status_name="in stock")['results'] | |
item_keys = [v['item_key'] for v in results] |
OlderNewer