Skip to content

Instantly share code, notes, and snippets.

View Viswanathantv's full-sized avatar

Viswanathan Viswanathantv

View GitHub Profile
@Viswanathantv
Viswanathantv / cgminer
Created January 5, 2014 10:39
cgminer
sudo apt-get install libcurl4-openssl-dev pkg-config libtool libncurses5-dev libudev-dev screen xterm
sudo apt-get install git-core
sudo apt-get install openssh-server byobu
sudo apt-get install autoconf
sudo apt-get install automake
wget "https://www.dropbox.com/s/eur5g46om5x7mx6/cgminer-3.7.0.tar.bz2"
https://www.dropbox.com/s/ye8ey32wg9phudv/ADL_SDK_6.0.zip
https://www.dropbox.com/s/iwf97gofte4bp27/AMD-APP-SDK-v2.9-lnx32.tgz
cd /opt
@Viswanathantv
Viswanathantv / diff cal
Created November 27, 2013 16:50
Difficulty calculation
#include <iostream>
#include <cmath>
inline float fast_log(float val)
{
int * const exp_ptr = reinterpret_cast <int *>(&val);
int x = *exp_ptr;
const int log_2 = ((x >> 23) & 255) - 128;
x &= ~(255 << 23);
x += 127 << 23;
@Viswanathantv
Viswanathantv / form
Created October 21, 2013 17:03
form
<%= search_form_for @search do |f| %>
<div class="field">
<%= f.label :name_cont, "Name contains" %>
<%= f.text_field :name_cont %>
</div>
<div class="actions"><%= f.submit "Search" %></div>
<% end %>
@Viswanathantv
Viswanathantv / rer
Last active December 26, 2015 03:39
tere
1.9.3-p392 :006 > City.search(:id_eq => 12381723981273)
=> Ransack::Search<class: City, base: Grouping <conditions: [Condition <attributes: ["id"], predicate: eq, values: [12381723981273]>], combinator: and>>
@Viswanathantv
Viswanathantv / search
Created October 21, 2013 16:24
Search in rails
@Viswanathantv
Viswanathantv / heroku
Created July 16, 2013 15:35
Heroku not working
2013-07-16T15:27:16.028174+00:00 app[web.1]: Processing by HelpsController#index as HTML
2013-07-16T15:27:16.036676+00:00 heroku[router]: at=info method=GET path=/helps host=ineedafavor.herokuapp.com fwd="106.51.152.196" dyno=web.1 connect=1ms service=358ms status=500 bytes=643
2013-07-16T15:25:59.646082+00:00 heroku[router]: at=info method=GET path=/js/theme.js host=ineedafavor.herokuapp.com fwd="106.51.152.196" dyno=web.1 connect=0ms service=26ms status=304 bytes=0
2013-07-16T15:25:59.804336+00:00 heroku[router]: at=info method=GET path=/img/signin_icos.png host=ineedafavor.herokuapp.com fwd="106.51.152.196" dyno=web.1 connect=0ms service=44ms status=304 bytes=0
2013-07-16T15:27:22.050130+00:00 app[web.1]: Started GET "/favors/1" for 106.51.152.196 at 2013-07-16 15:27:22 +0000
2013-07-16T15:27:22.085444+00:00 app[web.1]:
2013-07-16T15:27:22.085444+00:00 app[web.1]:
2013-07-16T15:27:22.087308+00:00 app[web.1]: Completed 404 Not Found in 15ms
2013-07-16T15:27:22.085444+00:00 app[web.1]: app/controllers/fa
../app/controllers/modelname_html
format.pdf do
pdf = MemberPdf.new(@member, view_context)
send_data pdf.render, filename:
"member.pdf",
type: "application/pdf"
end
8892318004 hemanth
https://zapier.com/app/dashboard
http://ustav13.eventbrite.com/#
http://www.telapi.com/
https://www.twilio.com/
https://draftin.com/
[email protected]
https://login.secureserver.net/index.php?app=wbe
http://utsav2013.sched.org/