Skip to content

Instantly share code, notes, and snippets.

@pbojinov
pbojinov / bookmarklet.js
Created October 14, 2019 18:56
Safeway Just For You - Automatic Coupon Clipper
javascript:(function() {"use strict"; var coupons = angular.element("#lt-coupon-area").scope().sharedValues.unfilteredItems.slice(); coupons.filter(function(x){return x.clipStatus==="U";}).forEach(function(item){ var c1 = document.cookie.match(new RegExp('swyConsumerlbcookie=([^;]+)'))[1]; var c2 = document.cookie.match(new RegExp('swyConsumerDirectoryPro=([^;]+)'))[1]; var data = {"items":[]}; var clip = {}; clip.clipType="C";clip.itemId=item.offerId;clip.itemType=item.offerPgm;clip.vndrBannerCd=""; var list = {}; list.clipType="L";list.itemId=item.offerId;list.itemType=item.offerPgm; data.items.push(clip);data.items.push(list); var request = new Request('https://nimbus.safeway.com/Clipping1/services/clip/items', { method: 'POST', mode: 'cors', redirect: 'error', headers: new Headers({ 'Content-Type': 'application/json', 'X-SWY_VERSION': '1.0', 'X-SWY_API_KEY': 'emjou', 'X-SWY_BANNER': 'safeway', 'SWY_ISREMEMBERED': 'false', 'X-swyConsumerlbcookie': c1, 'X-swyConsumerDirectoryPro': c2 }), body: JSON.stringif
@SarenCurrie
SarenCurrie / se306.md
Last active September 14, 2015 21:04
The Big Opinionated List of SE306 Project 2 Resources

The Big Opinionated List of SE306 Project 2 Resources

Software

Direct Download or use a package manager:

  • OSX: brew cask install unity
  • Linux: sudo apt-get install unity
#!/bin/bash
BODY="`wget -qO- https://lastminuterol.appspot.com`"
echo "Input first and last name:"
read user_Name
echo "Input UPI:"
read user_UPI
@jcppkkk
jcppkkk / OpenWithSublime.bat
Last active June 25, 2023 22:07 — forked from FoxColdMetal/OpenWithSublimeText.bat
[[[ Move to https://github.com/jcppkkk/OpenWithSublime !!! ]]] Add context menu to allow user open file or folder with Sublime as User (or as Admin).
@echo off
:: Path to Sublime Text installation dir.
SET stPath=%~dp0sublime_text.exe
SET stPathOnly=%~dp0
:: Key name for the registry entries.
SET UserEntry=Sublime Text
SET AdminEntry=Sublime Text As Admin
:: Context menu texts.
SET "UserMenuText=Open with Sublime(&-)"
SET "AdminMenuText=Open with Sublime As Admin(&+)"
@jackielii
jackielii / OpenWithSublimeText3.bat
Last active March 13, 2024 17:38 — forked from mrchief/LICENSE.md
Add "Open with Sublime Text 3" to Windows Explorer Context Menu (including folders)
@echo off
SET st2Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@jpoehls
jpoehls / encoding-helpers.ps1
Created April 17, 2012 14:54
Convert-FileEncoding and Get-FileEncoding
<#
.SYNOPSIS
Converts files to the given encoding.
Matches the include pattern recursively under the given path.
.EXAMPLE
Convert-FileEncoding -Include *.js -Path scripts -Encoding UTF8
#>
function Convert-FileEncoding([string]$Include, [string]$Path, [string]$Encoding='UTF8') {
$count = 0