Skip to content

Instantly share code, notes, and snippets.

View cdesch's full-sized avatar
🏠
Working from home

cdesch cdesch

🏠
Working from home
View GitHub Profile
cjs-MBP15:auth_armistice cj$ locate /CoreServices.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/CoreServices.h
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdks/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/
Headers/CoreServices.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/CoreServices.h
/System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/CoreServices.h
cjs-MBP15:auth_armistice cj$ export CFLAGS="isysroot /Applications/Xcode.app/Content
s/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frame
works/CoreServices.framework/Versions/A/Headers/CoreServices.h"
cjs-MBP15:auth_armistice cj$ mix deps.compile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.Drawing.Printing;
using System.Windows.Forms;
using BarcodeLib;
using QRCoder;
public String PrinterName { get; set; }
public CouponPrinter(String printerName)
{
PrinterName = printerName;
}
public void PrintReceiptForTransaction()
{
@cdesch
cdesch / App.cs
Last active June 12, 2017 16:43
Rollbar.NET WPF Sample
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using RollbarDotNet;
namespace Sample
0x05514C93e8CE4183Ac968e9fac76fAF886e874AA
0x3DC13E32C8a6948b7C513aF9D9BEF545cD38d7D5
0x3DC13E32C8a6948b7C513aF9D9BEF545cD38d7D5
@cdesch
cdesch / migration.md
Last active September 18, 2017 15:23

The migration is an easy one line fix:

class CreateCaseStudies < ActiveRecord::Migration[5.1]
  def change
    create_table :case_studies do |t|
      t.string :title
      t.text :description
      t.text :short_description
 t.string :slug
lass CreateCaseStudies < ActiveRecord::Migration[5.1]
def change
create_table :case_studies do |t|
t.string :title
t.text :description
t.text :short_description
t.string :slug
t.text :content
t.boolean :hidden, default: false
t.datetime :published_at
@cdesch
cdesch / rails_generator_cheat_sheet.md
Last active May 15, 2024 13:40
Rails Generator CheatSheet

Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.

Command Line Generator Info

Reference

You can get all of this information on the command line.

rails generate with no generator name will output a list of all available generators and some information about global options. rails generate GENERATOR --help will list the options that can be passed to the specified generator.