Skip to content

Instantly share code, notes, and snippets.

View jessenaiman's full-sized avatar

Jesse Naiman jessenaiman

View GitHub Profile
@jessenaiman
jessenaiman / gist:1196514a05f6e15468aeebe385f2fe7c
Created July 14, 2022 00:34
Community Code Marketing Promo
## Community Code
* Learn, Grow, Build
* Weekly adventures in coding within the Solana solar system
* Visit the hubble discord channel [#coding-school](https://discord.gg/tEeM9C7wVz) and get involved
### Episode #1: Building the Launchpad
* Follow along as we install all the required tools to code in Solana
* Create a base project that can host any future building
**Contact [Jesse Naiman](https://twitter.com/NaimanJesse) if you want to participate in future episodes**
@jessenaiman
jessenaiman / gist:c82e1b5d511e6c3f44b25acd191db7ce
Last active July 13, 2022 23:51
Hubble Community Code Gist
Hi everyone. Over at Hubble we've started a campaign to create a commmunity coding space where we showcase and help teach others how to get started with coding in defi. The primary goals is to dive into projects that are of interest to the hubble community, and help onboard future aspiring developers and builders to get more involved.
Would any dev or community members like to co-ordinate a live event where we discuss how to build your product.
We would love to have host a walkthrough with a dev, or community member, with knowledge of your code or sdks.
If you have any education resources, or setup tips we're looking to create a friendly space to share them in the newly formed #community-code space in the hubble discord group.
Please let us know if your're interested, or and feel free to share any thoughts or ideas about this project.
@jessenaiman
jessenaiman / app.js
Created October 21, 2014 15:55
yeoman angular-fullstack
/**
* Main application file
*/
'use strict';
// Set default node environment to development
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
var express = require('express');
DELETE FROM [Catalyst.Models.DataContext].[dbo].[transactions]
WHERE id = '36833'
GO
DELETE FROM [Catalyst.Models.DataContext].[dbo].[items]
WHERE id = '36833'
GO
class User
include Mongoid::Document
include Mongoid::Timestamps
include User::AuthDefinitions
include User::Roles
@jessenaiman
jessenaiman / gist:6598664
Last active December 23, 2015 07:09
custom devise_invitable controller. Placed in controllers/user/invitation_controller https://github.com/scambra/devise_invitable
class Users::InvitationsController < Devise::InvitationsController
def update
if this
binding.pry
redirect_to root_path
else
binding.pry
super
end
class Riding < ActiveRecord::Base
attr_accessible :poll_stations
#has_many :poll_street_indices
has_many :poll_stations
end
#######################################################
class PollStation < ActiveRecord::Base
attr_accessible :electoral_district, :poll_division, :location, :address1, :address2, :place
class Address
include Mongoid::Document
field :address, type: String
field :address2, type: String
field :city, type: String
field :province, type: String
field :postal_code, type: String
field :phone_number, type: String
field :toll_free_phone_number, type: String
@jessenaiman
jessenaiman / import_csv_data.rake
Created June 12, 2013 20:43
Saving localized data only saves the french
csv_data.each do |row|
riding = Riding.new
riding.riding_id = row[0]
riding.title = row[1]
riding.save
I18n.locale = :fr
riding.title = row[2]
riding.save
end
LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p195/gems/passenger-4.0.5/libout/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-2.0.0-p195/gems/passenger-4.0.5
PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-2.0.0-p195/ruby
PassengerDefaultUser root
<VirtualHost *:80>
ServerName office.dev.liberalonline.ca
ServerAlias office.dev.liberalonline.ca