Skip to content

Instantly share code, notes, and snippets.

View rascoop's full-sized avatar

Richard Scoop rascoop

  • Curaçao, Dutch Caribbean
View GitHub Profile
@rascoop
rascoop / SyncFoldersOutsideOneDrive.md
Last active July 6, 2022 14:55 — forked from danieldogeanu/SyncFoldersOutsideOneDrive.md
Sync Folders Outside OneDrive
  1. Find the Address of the folder you want to be synced. (ie. G:\Games\). Copy it.
  2. Find the OneDrive location you wish for it to sync to. Hold shift and right click. On the context menu, click open command window here.
  3. In the command window type mklink /j "YourCustomFolderName" G:\Games\ (G:\Games\ is the address of your original folder).

This is like a shortcut that tells any programs that look there to look at another directory. This will sync anything inside the address you tell it to the folder created in a onedrive directory

  1. open cmd box in admin mode
  2. cd /users/<username>/OneDrive
  3. make a link like this: mklink /J <name of folder> <name of folder to sync>
@rascoop
rascoop / Startup.cs
Created April 3, 2020 14:19 — forked from cmw2/Startup.cs
OWIN Startup class to use AAD.
using Owin;
namespace WindowsAuthAppToAADDemo
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
}
@rascoop
rascoop / FTP Upload and URL in Clipboard
Created March 16, 2020 19:04 — forked from ecos/FTP Upload and URL in Clipboard
A cool Windows batch script to upload a file to an FTP folder, and then copy the URL in the clipboard. Useful for posting screenshots quickly in a post on a forum. You only have to change these parameters SET Server=yourFTPserver SET UserName=yourFTPusername SET Password=yourpassword SET RemoteFolder=/www/images/screenshots SET ClipboardURLPrefi…
@ECHO OFF
ECHO Upload to FTP
ECHO Written by: Jason Faulkner
ECHO SysadminGeek.com
ECHO. Improved by ecos
ECHO.
REM Usage:
REM UploadToFTP [/L] FileToUpload
REM
@rascoop
rascoop / index.html
Created January 11, 2020 12:31 — forked from edwardlorilla/index.html
vuejs velocityjs transition
<template id='image'>
<img ref="imgs" alt=""/>
</template>
<div id="app">
<transition mode="out-in"
v-on:before-enter="beforeEnter"
v-on:enter="enter"
v-on:leave="leave"
>
@rascoop
rascoop / merge-css.js
Created December 11, 2019 12:34 — forked from pritambaral/merge-css.js
Merge Duplicate CSS rules; detected by selector
#!/usr/bin/env node
if (process.argv.length < 3) {
console.error('Usage:', process.argv.join(' '), '/path/to/file.css');
process.exit(1);
}
file = process.argv[2];
var fs = require('fs');
@rascoop
rascoop / _notes.md
Created August 12, 2019 18:41 — forked from sgnl/_notes.md
AJAX with Vanilla Javascript. (XMLHttpRequest)

Short XHR Examples

Examples shown are bare minimum needed to achieve a simple goal.

Resources

  • Google Chrome's Dev Tools' Network Panel c-c-c-c-c-ULTIMATE c-c-c-COMBO!!!
  • requestb.in enpoints for your HTTP Requests as a free service.
@rascoop
rascoop / plv8-install-ubuntu.md
Created January 16, 2019 15:30 — forked from asleepysamurai/plv8-install-ubuntu.md
Install plv8 on Ubuntu
  1. Install and configure Postgres [https://library.linode.com/databases/postgresql/ubuntu-12.04-precise-pangolin]
  2. Download latest stable version of plv8 [https://code.google.com/p/plv8js/wiki/PLV8]
  3. Extract plv8.zip and cd into it.
  4. sudo apt-get install subversion
  5. sudo make static
  6. Copy plv8.so to /usr/lib/postgres/9.1/lib
  7. Copy plv8--(version).sql and plv8.control to /usr/share/postgres/9.1/extension
  8. psql -d dbName
  9. CREATE EXTENSION plv8;
  10. Repeat 6-8 for plls (livescript) and plcoffee (coffeescript) if required
@rascoop
rascoop / MySQL Dump & Write With Git
Created January 7, 2019 23:45 — forked from calebbrewer/MySQL Dump & Write With Git
This is for putting a MySQL DB under Git.
#Pre-commit hook
#!/bin/sh
mysqldump -uuser -ppassword --skip-extended-insert databaseName > /path/to/your/repo/database.sql
cd /path/to/your/repo
git add [database].sql
#Post-merge hook
#!/bin/sh
mysql -u [mysql user] -p[mysql password] [database] < /path/to/your/repo/[database].sql
@rascoop
rascoop / keyholemarkup_converter.py
Created January 3, 2019 03:42 — forked from linwoodc3/keyholemarkup_converter.py
Convert KML/KMZ to CSV or KML/KMZ to shapefile or KML/KMZ to Dataframe or KML/KMZ to GeoJSON. Full script with classes to convert a KML or KMZ to GeoJSON, ESRI Shapefile, Pandas Dataframe, GeoPandas GeoDataframe, or CSV. Can write the converted file directly to disk with no human intervention.
# Author:
# Linwood Creekmore III
# email: valinvescap@gmail.com
# Acknowledgements:
# http://programmingadvent.blogspot.com/2013/06/kmzkml-file-parsing-with-python.html
# http://gis.stackexchange.com/questions/159681/geopandas-cant-save-geojson
# https://gist.github.com/mciantyre/32ff2c2d5cd9515c1ee7
@rascoop
rascoop / KmlToCsv.py
Created January 3, 2019 03:41 — forked from mciantyre/KmlToCsv.py
KML to CSV in Python
"""
A script to take all of the LineString information out of a very large KML file. It formats it into a CSV file so
that you can import the information into the NDB of Google App Engine using the Python standard library. I ran this
script locally to generate the CSV. It processed a ~70 MB KML down to a ~36 MB CSV in about 8 seconds.
The KML had coordinates ordered by
[Lon, Lat, Alt, ' ', Lon, Lat, Alt, ' ',...] (' ' is a space)
The script removes the altitude to put the coordinates in a single CSV row ordered by
[Lat,Lon,Lat,Lon,...]