Skip to content

Instantly share code, notes, and snippets.

View bergerjac's full-sized avatar

Jake Berger bergerjac

View GitHub Profile
@bergerjac
bergerjac / BasicExcelToGmail.vba
Created July 27, 2018 15:34
How to Send Email from Excel using Gmail
Option Explicit
' 4 variables below require configuration.
' Once you get this working, refactor, etc.
Sub CDO_Mail_Small_Text_2()
Dim user As String
Dim pass As String
Dim port As Integer
Dim receiverEmail As String
Dim fromEmail As String
@bergerjac
bergerjac / shell
Last active May 1, 2019 01:23
rails
# reset DB
$ rake db:drop db:create db:migrate
# start server, suppressing most SQL log messages
$ rails s | grep -v -E '(SELECT|BEGIN|COMMIT|Load|FROM|INSERT)'
# heroku DB provision
$ heroku config --app wundertest8 # show config
$ heroku addons:add heroku-postgresql:hobby-dev --app app
$ heroku pg:promote HEROKU_POSTGRESQL_COBALT_URL --app app
@bergerjac
bergerjac / ControlHelpers.cs
Created March 18, 2012 16:23
LightSwitch: Strong Type FindControl
// Client
using System;
using System.Diagnostics;
using System.Windows.Controls;
using Microsoft.LightSwitch.Presentation;
using Microsoft.LightSwitch.Presentation.Extensions;
namespace LightSwitchApplication
{
@bergerjac
bergerjac / Application.cs
Created April 5, 2012 00:51
LightSwitch Custom Logo
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace LightSwitchApplication
{
public partial class Application
@bergerjac
bergerjac / Doc.md
Last active February 14, 2017 08:05 — forked from cyio/evernote-link.user.js
Evernote Web in-app note link
-- example --
web: https://www.evernote.com/shard/s12/nl/u2u2u2u2/44444444-3333-2222-1111-000000000/
app: evernote:///view/u2u2u2u2/s12/44444444-3333-2222-1111-000000000/44444444-3333-2222-1111-000000000/
	
-- format --
web: https://[service]/shard/[shardId]/nl/[userId]/[noteGuid]/
app: evernote:///view/[userId]/[shardId]/[noteGuid]/[noteGuid]/

-- spaced --
@bergerjac
bergerjac / Cordova Plugins.md
Last active November 3, 2016 22:58
List of Cordova Plugins Summary
Plugin Permission
cordova-plugin-battery-status hook onto battery change events
cordova-plugin-camera take pictures and read from the images library
cordova-plugin-media-capture audio, image, and video capture
cordova-plugin-console make console.log() more useful
cordova-plugin-contacts access device contacts
cordova-plugin-device info about the device's hardware and software
cordova-plugin-device-motion access the motion sensor accelerometer to detect changes in movement relative to the current device orientation
[cordova-plugin-dialogs](https://github.com/apache/cordova-plugi
@bergerjac
bergerjac / startup.sh
Created May 18, 2015 11:59
linux os open port
iptables -I INPUT -p tcp --dport 3000 -j ACCEPT
@bergerjac
bergerjac / _form.html.erb
Created April 7, 2015 08:30
rails async javascript
# rendered in new.js.erb
<%= simple_form_for @task, remote: true do |f| %>
<%= f.input :description %>
<%= f.input :deadline %>
<%= f.button :submit %>
<% end %>
@bergerjac
bergerjac / assets.rb
Created March 31, 2015 12:45
active admin assets
# nano config/initializers/assets.rb
Rails.application.config.assets.precompile += %w(active_admin/*.gif active_admin/*.png)
@bergerjac
bergerjac / backtrace_silencers.rb
Created March 31, 2015 11:21
rails debugging
# config/initializers/backtrace_silencers.rb
Rails.backtrace_cleaner.remove_silencers!