Skip to content

Instantly share code, notes, and snippets.

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

Brijesh Gupta brijeshgpt7

🏠
Working from home
View GitHub Profile

Body Language of Love and Dating

Citations for the course on Udemy. Course Link

Citations

  • Aldert Vrij. Detecting Lies and Deceit. (Chichester England: John Wiley & Sons, 2000) 93-100.
  • Mark deTurck, “Training Observers to Detect Spontaneous Deception: Effects of Gender,” Communication Reports 4 (Summer 1991): 81-89.
  • K. Fiedler and I. Walka, “Training Lie Detectors to Use Nonverbal Cues Instead of Global Heuristics,” Human Communication Research 20 (December 1993): 199-223.
  • T. A. Russell, E. Chu, and M. L. Phillips, “A Pilot Study to Investigate the Effectiveness of Emotion Recognition Remediation in Schizophrenia Using the Micro-Expression Training Tool,” British Journal of Clinical Psychology 45 (2006): 579-583.
@brijeshgpt7
brijeshgpt7 / GETTING_STARTED.md
Created March 31, 2020 18:43 — forked from nisanthchunduru/GETTING_STARTED.md
Factory Girl 3.2.0 Getting Started Guide

Getting Started

Update Your Gemfile

If you're using Rails, you'll need to change the required version of factory_girl_rails:

gem "factory_girl_rails", "~> 3.0"
@brijeshgpt7
brijeshgpt7 / array_reverse.rb
Created January 4, 2020 17:31 — forked from abitdodgy/array_reverse.rb
Array Algorithms
#
# 2 - REVERSAL
#
# The quickest way to reverse an array is to swap elements at either end, and repeat
# while moving up from the left and down from the right.
#
# [ a b c d e f ]
# [ f a ] - Step 1 we switched A[0] with A[-1]
# [ e b ] - Step 2 we switched A[1] with A[-2]
# [ d c ] - Step 3 we switched A[2] with A[-3]
@brijeshgpt7
brijeshgpt7 / gmail.rb
Created June 28, 2017 14:10 — forked from yeban/gmail.rb
Bare bones Ruby script to send emails using Gmail
=begin
Tested with ruby 1.8.7 on a Debian machine, with my own gmail account.
ruby -rubygems "from name" "from email" "to name" "to email" "subject" "body"
=end
require 'net/smtp'
require 'tlsmail'
Net::SMTP.enable_tls OpenSSL::SSL::VERIFY_NONE
$SERVER = 'smtp.gmail.com'
@brijeshgpt7
brijeshgpt7 / SQL-Movie-Rating.sql
Created December 3, 2016 17:49
My answers to SQL exercises for db-class.org /Part 1/
/* Delete the tables if they already exist */
drop table if exists Movie;
drop table if exists Reviewer;
drop table if exists Rating;
/* Create the schema for our tables */
create table Movie(mID int, title text, year int, director text);
create table Reviewer(rID int, name text);
create table Rating(rID int, mID int, stars int, ratingDate date);
@brijeshgpt7
brijeshgpt7 / change_default_message.js
Created March 26, 2016 05:22 — forked from 0xqd/change_default_message.js
jQuery validation cheatsheet
// Change the default message of jquery validation
jQuery.extend(jQuery.validator.messages, {
required: "This field is required.",
remote: "Please fix this field.",
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
@brijeshgpt7
brijeshgpt7 / ruby hash in better way
Created October 30, 2015 04:14
Advance ruby hash
> [1,2,3].map{ |i| i+1 }
=> [2, 3, 4]
_______________________________________________________________
> { "x" => 1, "y" => 2, "z" => 3 }.map{ |k,v| k.to_sym => v }
SyntaxError: (irb):2: syntax error, unexpected tASSOC, expecting '}'
{ "x" => 1, "y" => 2, "z" => 3 }.map{ |k,v| k.to_sym => v }
from /home/smeagol/.rvm/rubies/ruby-1.9.3-p429/bin/irb:16:in `<main>'
____________________________________________________________________________________
> { "x" => 1, "y" => 2, "z" => 3 }.map{ |k,v| { k.to_sym => v } }
# # if params[:my_action].present? && params[:listing_id].present?
# # SidebarAdd.where(:listing_id => [1,2,3,4]).each do |sidebar|
# # sidebar.update_attributes(:action => params[:my_action],:view_count =>sidebar.view_count+1 )
# # end
# # end
# add_data=[]
# sidebar_add=SidebarAdd.paginate(:page => params[:page], :per_page => 4)
@brijeshgpt7
brijeshgpt7 / gist:19d4e7eb76cefcef5dde
Created June 17, 2015 13:07
remotely submit form
<div class="contacts-cnt">
<%= form_tag admin_user_update_users_path(:id=>@list.user.id), :method => 'post',:id => "#{@list.id}" do%>
<div class="admin-edit-form-row">
<div class="user-edit-form-left">Contact Name </div>
<div class="user-edit-form-right">
<%=text_field_tag :first_name, "#{@list.user.first_name.blank? ? ' ' : @list.user.first_name}",:placeholder => "Name" %>
</div>
<div class="admin-edit-form-row">
<div class="user-edit-form-left">Mobile : </div>
<div class="user-edit-form-right">
@brijeshgpt7
brijeshgpt7 / gist:1a1527cbe1d3c093b3e5
Created June 11, 2015 07:53
Elestic search configuration
________________________________________________________________________________________________________________
================================================================================================================
Local setup for elastic search
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.6.deb
sudo dpkg -i elasticsearch-0.20.6.deb
sudo service elasticsearch start