Skip to content

Instantly share code, notes, and snippets.

@odoe
odoe / create_sde_connection.py
Created April 26, 2012 20:07
Arcpy script to add data to mxd and publish to ArcGIS server without ArcMap
'''
Created on Feb 24, 2011
The purpose of this script is to create the SDE connection file needed to connect to your SDE
@author: rrubalcava
'''
import os, arcpy
class CreateSDEConnection:
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active November 11, 2024 22:46
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@l0gicpath
l0gicpath / all_users.csv
Last active November 11, 2017 13:59
Subtract data of one CSV file from another using fast grep. Dummy data generated by http://dummydata.me/
[email protected] Stefanie House
[email protected] Dinah Erickson
[email protected] Melisa Reynolds
[email protected] Lily Carson
[email protected] Millard Rubio
[email protected] Octavia Santana
[email protected] Royal Bender
[email protected] Laverne Hutchins
[email protected] Sherman Wilder
[email protected] Thelma Burris
#RUN the following to kick off script-> START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/ytechie/9467867/raw/35bbd968b79f52b3e540c3203e8c8f611028eee9/boxstarter
#So Meta!
choco install chocolatey
choco install boxstarter
choco feature disable --name=checksumFiles
choco feature enable --name=allowGlobalConfirmation
#run the rest in the boxstarter shell
@AmrEldib
AmrEldib / Sync_gh-pages_with_master.sh
Last active August 29, 2015 14:07
Easily keep gh-pages in sync with master
# go to the gh-pages branch
git checkout gh-pages
# bring gh-pages up to date with master
git rebase master
# commit the changes
git push origin gh-pages
# return to the master branch
git checkout master
# Source: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
@monostere0
monostere0 / GlobalEvents.js
Last active February 19, 2020 08:10
Fire events between different browser windows using localStorage.
(function(window){
var EVENT_EXISTS = 'GlobalEvents: Event already exists.';
var eventIsRunning,
_eventStack,
_findByName,
stackEvent,
removeEvent,
eventListener,
@hyl
hyl / emoji-aliases.json
Created July 17, 2015 13:27
JSON with every emoji alias.
{
"people": ["bowtie", "smile", "laughing", "blush", "smiley", "relaxed", "smirk", "heart_eyes", "kissing_heart", "kissing_closed_eyes", "flushed", "relieved", "satisfied", "grin", "wink", "stuck_out_tongue_winking_eye", "stuck_out_tongue_closed_eyes", "grinning", "kissing", "kissing_smiling_eyes", "stuck_out_tongue", "sleeping", "worried", "frowning", "anguished", "open_mouth", "grimacing", "confused", "hushed", "expressionless", "unamused", "sweat_smile", "sweat", "disappointed_relieved", "weary", "pensive", "disappointed", "confounded", "fearful", "cold_sweat", "persevere", "cry", "sob", "joy", "astonished", "scream", "neckbeard", "tired_face", "angry", "rage", "triumph", "sleepy", "yum", "mask", "sunglasses", "dizzy_face", "imp", "smiling_imp", "neutral_face", "no_mouth", "innocent", "alien", "yellow_heart", "blue_heart", "purple_heart", "heart", "green_heart", "broken_heart", "heartbeat", "heartpulse", "two_hearts", "revolving_hearts", "cupid", "sparkling_heart", "sparkles", "star", "star2", "dizzy",
@0XDE57
0XDE57 / config.md
Last active October 20, 2024 13:07
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@AmrEldib
AmrEldib / npm-g.md
Last active February 19, 2016 04:37
Recommended Global npm Packages to install

bower
ember-cli
ember-cli-windows
gitignore
jshint
swagger
editorconfig-cli

@sbliven
sbliven / 404ForCaseSensitiveURLs.js
Last active March 16, 2024 09:32 — forked from AmrEldib/404ForCaseSensitiveURLs.js
Jekyll 404 page on GitHub Pages to fix case sensitive URLs
var allposts = [];
function redirectToCorrectPage() {
console.log("Unable to find page. Trying other URL cases.");
{% for post in site.pages %}
allposts.push("{{ post.url }}");
{% endfor %}
var url = window.location.pathname;
// strip trailing /
if (url.slice(-1) === "/") {
url = url.slice(0, -1);