Skip to content

Instantly share code, notes, and snippets.

View corehook's full-sized avatar
💭
happiness

corehook corehook

💭
happiness
View GitHub Profile
@corehook
corehook / api.js
Created March 27, 2017 09:09 — forked from fwielstra/api.js
An example NodeJS / Mongoose / Express application based on their respective tutorials
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
context "GET index" do
#context "POST create" do
#context "GET show" do
#context "PATCH update" do (or PUT update)
#context "DELETE destroy" do
#context "GET new" do
@corehook
corehook / krisha.kz.rb
Last active July 10, 2023 09:07
Самый простой парсер для сайта http://krisha.kz Это если нужно СМС рассылку по риэлторам сделать
#!/usr/bin/env ruby
# simple krisha.kz parser for bro
# 3 minute code
# Result
# server@corehook:~/projects/crawlers/krisha.kz$ ruby krisha.rb http://krisha.kz/arenda/kvartiry/almaty/
# +7 (701) 4405729
# +7 (771) 4882860
# +7 (701) 4405729
# +7 (771) 4882860
# +7 (707) 3960194