This file contains 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
Sub InsertPictures() | |
' Variable Declarations | |
Dim cll As Range | |
Dim rng As Range | |
Dim strPath As String | |
' Path to photos | |
strPath = "D:\Photo Folder" | |
' Set the range |
This file contains 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 os import listdir | |
from os.path import isfile, join | |
import shutil | |
def moveDirectory(src, dest): | |
try: | |
shutil.move(src, dest) | |
# Directories are the same | |
except shutil.Error as e: | |
print('Directory not copied. Error: %s' % e) |
This file contains 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 OldCell As Range | |
Private Sub Worksheet_SelectionChange(ByVal Selected As Range) | |
' Exit if more than one cell selected | |
If Selected.Cells.Count > 1 Then Exit Sub | |
' Variable Declarations | |
Dim column As Range | |
Dim path As String | |
' Path to photos |
This file contains 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
app.directive('blur', [function () { | |
return { | |
restrict: 'A', | |
link: function (scope, element) { | |
element.on('click', function () { | |
element.blur(); | |
}); | |
} | |
}; | |
}]); |
This file contains 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
// in invite.js module: | |
exports.inviteUser = function(creatingUser,email,tempPass,response) | |
{ | |
"use strict"; | |
if (!tempPass) { | |
tempPass = genRandomPass(); | |
} | |
var user = new Parse.User(); | |
user.set ("username", email); |
This file contains 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
CREATE OR REPLACE FUNCTION array_bounds(actual integer[], upper integer[], lower integer[]) RETURNS boolean | |
AS $$ | |
DECLARE | |
length integer; | |
BEGIN | |
IF actual is NULL THEN | |
RETURN FALSE; | |
END IF; | |
SELECT array_length(actual, 1) into length; |
This file contains 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
# Look for client IP in the X-Forwarded-For header | |
real_ip_header X-Forwarded-For; | |
# Ignore trusted IPs | |
real_ip_recursive on; | |
# Set VPC subnet as trusted | |
set_real_ip_from 10.0.0.0/16; | |
# Set CloudFront subnets as trusted |
This file contains 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
color_table = """ | |
0: 0,0,0,255 | |
1: 0,0,0,255 | |
2: 0,0,0,255 | |
3: 0,0,0,255 | |
4: 0,0,0,255 | |
5: 0,0,0,255 | |
6: 0,0,0,255 | |
7: 0,0,0,255 | |
8: 0,0,0,255 |
This file contains 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
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) |
This file contains 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
gcloud compute config-ssh --project myproject | |
rsync -avz -e ssh . vm_name.zone.myproject:/home/user/folder |
OlderNewer