Skip to content

Instantly share code, notes, and snippets.

View patkub's full-sized avatar
💭
🤔

Patrick Kubiak patkub

💭
🤔
View GitHub Profile
@patkub
patkub / dwave
Last active May 23, 2016 18:41
dwave
wave_init(0.1, -20, 20, 30, Kappa)
X =
['-0.349', '-0.347', '-0.346', '-0.344', '-0.342', '-0.340', '-0.339', '-0.337', '-0.335', '-0.333', '-0.332', '-0.330', '-0.328', '-0.326', '-0.325', '-0.323', '-0.321', '-0.319', '-0.318', '-0.316', '-0.314', '-0.312', '-0.311', '-0.309', '-0.307', '-0.305', '-0.304', '-0.302', '-0.300', '-0.298', '-0.297', '-0.295', '-0.293', '-0.291', '-0.290', '-0.288', '-0.286', '-0.284', '-0.283', '-0.281', '-0.279', '-0.278', '-0.276', '-0.274', '-0.272', '-0.271', '-0.269', '-0.267', '-0.265', '-0.264', '-0.262', '-0.260', '-0.258', '-0.257', '-0.255', '-0.253', '-0.251', '-0.250', '-0.248', '-0.246', '-0.244', '-0.243', '-0.241', '-0.239', '-0.237', '-0.236', '-0.234', '-0.232', '-0.230', '-0.229', '-0.227', '-0.225', '-0.223', '-0.222', '-0.220', '-0.218', '-0.216', '-0.215', '-0.213', '-0.211', '-0.209', '-0.208', '-0.206', '-0.204', '-0.202', '-0.201', '-0.199', '-0.197', '-0.195', '-0.194', '-0.192', '-0.190', '-0.188', '-0.187', '-0.185', '-0.183', '-0.182', '-0.180', '-0
@patkub
patkub / materialize_masonry_fix.js
Last active June 14, 2018 06:56
Make masonry compatible with materializecss' material box. Masonry requires imagesLoaded.
var msnry, openIMG;
imagesLoaded(grid, function() {
// init Isotope after all images have loaded
var $container = $('#grid').masonry({
itemSelector: '.grid-item',
columnWidth: '.grid-sizer',
percentPosition: true
});
@patkub
patkub / app.js
Created July 7, 2016 22:16
mdl ngRoute fix
var app = angular.module('app', []);
app.run(function ($scope, $timeout) {
$scope.$on('$viewContentLoaded', ()=> {
$timeout(() => {
componentHandler.upgradeAllRegistered();
})
})
});
@patkub
patkub / Flash Kernel Stock Voltages.md
Last active October 25, 2016 19:38
Flash Kernel settings on nexus6

Flash Kernel 3.10.104-FLASH-1.3

Mhz,mV
300,680
422,700
652,730
729,740
883,760
960,830

Call formatDoc("C:\Users\patri\Documents\test.docx")
Function formatDoc(file)
'''
''' Format Word Document
'''
'''
''' Settings
'''
@patkub
patkub / settings list global [relevant]
Last active March 15, 2017 03:38
PureNexus settings dump
shamu:/sdcard/Download $ settings list global
power_menu_actions=power|reboot|screenshot|screenrecord|silent
@patkub
patkub / mms
Created March 26, 2017 04:33
mms backup
> find / -name "*mmssms*"
/data/data/com.google.android.gms/databases/icing_mmssms.db
/data/data/com.google.android.gms/databases/icing_mmssms.db-journal
/data/user_de/0/com.android.providers.telephony/databases/mmssms.db
/data/user_de/0/com.android.providers.telephony/databases/mmssms.db-journal
zeroltetmo:/ $ dumpsys package com.resound.smart
Activity Resolver Table:
Non-Data Actions:
android.intent.action.MAIN:
3db0a91 com.resound.smart/com.gn.SplashActivity filter 4c0ddbe
Action: "android.intent.action.MAIN"
Category: "android.intent.category.LAUNCHER"
AutoVerify=false
Receiver Resolver Table:
@patkub
patkub / cnc1.nc
Created August 18, 2017 14:12
gcode
* Turret No. : 1 Diameter :.500 IN ENDMILL
*
* WARNING - New Code Generator File
* Check that all machine parameters have been correctly set, including
* 3D Rapid, Resolved Rapid, Absolute/Incremental, Arc Centres
* Ensure that word addresses and formats have been set correctly
* especially those for linear and angular axis movements
*
* These comments may be removed when Code Generator file is finished
*
@patkub
patkub / responsive-img
Last active September 28, 2017 19:54
img responsive up to max size
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
img {
width: 100%;
height: auto;
max-width: 460px;
max-height: 345px;