Skip to content

Instantly share code, notes, and snippets.

View adamlwalker's full-sized avatar

Adam Walker adamlwalker

View GitHub Profile
@adamlwalker
adamlwalker / disable_k400r_tap_click.md
Created January 31, 2023 20:01 — forked from ryanmaclean/disable_k400r_tap_click.md
Turn off Logitech k400r Tap to Click

Turn off k400r Tap to Click

Without even installing drivers, the Logitech k400r tap-to-click functionality can be turned off by holding down the "FN" (function) key and the left click button on the trackpad.

Source

@adamlwalker
adamlwalker / motorola_camera_setup.md
Created June 13, 2017 05:49 — forked from samuelcolvin/motorola_camera_setup.md
Hubble Motorola Focus 66-W Camera "CameraHD" setup

Use the Hubble app to get the camera connected to a wifi network.

Find the Camera's IP address:

> sudo arp-scan --interface=enp3s0 --localnet
Interface: enp3s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.1.100	00:19:99:0f:6a:98	Fujitsu Technology Solutions
192.168.1.102	c4:6e:1f:53:f0:8b	(Unknown)
@adamlwalker
adamlwalker / gist:9ffed3b8774ea89d40e9e3eaf5152d2b
Created January 24, 2017 17:12
choice_by_query ExtJS + Rails
def choice_by_query(name, subj, query, options={})
res = execute_query(query, {})
data = (res || []).map{|val| [val['value']]}.sort.uniq.to_json
store = UIUtils.raw_js("new Ext.data.SimpleStore({fields: ['value'], data: #{data}})")
options.merge!(xtype: 'select', clearTrigger: 2, inputValue: true, store: store, queryMode: 'local', pageSize: 0,
displayField: 'value', valueField: 'value', forceSelection: true, selectOnFocus: true)
udf(name, subj, options)
end
# Print list of FreezerPro user records in JSON
require 'rest_client'
params = {
username: 'adam',
password: 'XXXX',
method: 'users'
}
require 'json'
require 'net/http'
url = URI.parse("http://XXXXXX/api")
params = {
username: 'admin',
password: 'XXXX,
method: 'import_samples',
json: [
{'UID'=>'74809','Name'=>'CoolSampleName', 'Description'=>'freezerpro 6.1.14 testing'}
].to_json
@adamlwalker
adamlwalker / gistify634537.rb
Last active August 29, 2015 14:15
get_job_status API call for FreezerPro
require 'rest_client'
params = {
username: 'adam',
password: 'XXXX',
method: 'get_job_status',
job_id: '45c443bba2756e6103b07aae30212528'
}
response = RestClient.post "http://enterprise3.freezerpro.com/api", params

openssl s_client -connect 127.0.0.1:443 -ssl3

grep -r ssl_protocol /etc/nginx

ssl_protocols TLSv1.2 TLSv1.1 TLSv1;

sudo vi /etc/nginx/sites-available/appsite_ssl

def sort_packs(tests)
tests.map!{|t| t['Test Package']}
tests.sort!{|t1,t2| t1.id <=> t2.id}
''
end
def custom_sort(tests)
tests.sort!{|t1,t2| t1['RUN'].id <=> t2['RUN'].id}
''
end
require 'json'
require 'net/http'
require 'net/http/post/multipart'
url = URI.parse("http://XXXXX/api")
req = Net::HTTP::Post::Multipart.new url.path,
:username=>'Adam',
:password=>'XXXX',
:method=>'import_subjects',
require 'csv'
unique_count = {}
total_count = {}
CSV.foreach('Lead_Source_Report.csv', :headers => true) do |total|
total_count[total[9]] ||= 0
total_count[total[9]] += 1
end
CSV.foreach('Lead_Source_Report.csv', :headers => true) do |row|