Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ardevd on github.
  • I am edvard (https://keybase.io/edvard) on keybase.
  • I have a public key ASDfHaeo6JTt5AhAx86GDy6z8JY4okgOmyRkKEoXU5LJRAo

To claim this, I am signing this object:

{"data":{"structureChanged":true,"updateTime":1487618452,"devices":[{"creationTime":1486419334,"creatorId":28,"deviceType":"sensorBinary","h":1812718987,"hasHistory":true,"id":"Daylight_28","location":0,"metrics":{"level":"off","title":"Daylight 28","icon":"/ZAutomation/api/v1/load/modulemedia/Daylight/iconN.png","sunrise":"7:45","sunset":"18:00","modificationTime":1487610001,"lastLevel":"off"},"permanently_hidden":false,"probeType":"","tags":[],"visibility":true,"updateTime":1487610001},{"creationTime":1482506761,"creatorId":26,"deviceType":"camera","h":116683528,"hasHistory":false,"id":"CameraDevice_26","location":0,"metrics":{"url":"/CameraDevice_26/stream","hasZoomIn":false,"hasZoomOut":false,"hasLeft":false,"hasRight":false,"hasUp":false,"hasDown":false,"hasOpen":1,"hasClose":1,"icon":"camera","title":"Camera 26"},"permanently_hidden":false,"probeType":"","tags":[],"visibility":true,"updateTime":1487167326},{"creationTime":1480103577,"creatorId":12,"deviceType":"sensorMultilevel","h":1314676493,"hasHisto
@ardevd
ardevd / gist:ba62aa5530745a82ea4b49f7325203cf
Created September 4, 2016 13:17
Gitlab upgrade issues
:: Synchronizing package databases...
core 119.7 KiB 0.00B/s 00:00 [##########################################################################] 100%
extra 1832.8 KiB 66.3M/s 00:00 [##########################################################################] 100%
community 3.6 MiB 59.7M/s 00:00 [##########################################################################] 100%
Foreign packages: / 5 / 5
==> Package upgrade only (new release):
core/lz4 131-1 1 -> 2
core/man-db 2.7.5-3 3 -> 4
extra/ghostscript 9.19-2 2 -> 3
@ardevd
ardevd / synology_syslog_grok_logstash
Created June 4, 2015 10:34
Synology syslog grok filter for Logstash
filter {
if [type] == "syslog" and [message] =~ "sequenceId" {
grok {
match => { "message" => '<%{POSINT:syslog_pri}>%{INT:version} %{TIMESTAMP_ISO8601:timestamp} %{HOSTNAME:hostname} %{DATA:syslog_program} - - (?:\[.+sequenceId="%{POSINT:message_id}"])? %{GREEDYDATA:syslog_message}' }
}
syslog_pri { }
} else if [type] == "syslog" {
grok {
match => { "message" => "<%{POSINT:syslog_pri}>%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
}
Jun 03 11:49:38 nuc logstash[27352]: Error: Expected one of #, {, } at line 16, column 170 (byte 348) after filter {
Jun 03 11:49:38 nuc logstash[27352]: if [type] == "syslog" and [message] =~ "ds02" {
Jun 03 11:49:38 nuc logstash[27352]: grok {
Jun 03 11:49:38 nuc logstash[27352]: match => { "message" => "<%{POSINT:syslog_pri}>%{INT:version} %{TIMESTAMP_ISO8601:timestamp} %{HOSTNAME:hostname} %{DATA:syslog_program} - - (?:\[meta sequenceId="
Jun 03 11:49:38 nuc logstash[27352]: You may be interested in the '--configtest' flag which you can
Jun 03 11:49:38 nuc logstash[27352]: use to validate logstash's configuration before you choose
Jun 03 11:49:38 nuc logstash[27352]: to restart a running system.
on boot
# Panel backlight
chown system system /sys/class/leds/wled:backlight/brightness
chmod 660 /sys/class/leds/wled:backlight/brightness
# LED
chown system system /sys/class/leds/led:rgb_red/brightness
chown system system /sys/class/leds/led:rgb_red/lut_pwm
chown system system /sys/class/leds/led:rgb_red/step_duration
chown system system /sys/class/leds/led:rgb_green/brightness
@ardevd
ardevd / gist:e7b52966a6e17b88ec89
Created February 12, 2015 06:15
CM12 crash when sending sms to 2258
V/Mms ( 5027): onStart: #1 resultCode: -1 = Activity.RESULT_OK
D/Mms ( 5027): [MsgUtils] isIccCardActivated subscription 5
W/ResourcesManager( 5027): Asset path '/system/framework/com.google.android.media.effects.jar' does not exist or contains no resources.
D/Mms ( 5027): [MsgUtils] isIccCardActivated subscription 5
E/Mms ( 5027): send SMS phone Id = 0 subId : = 1
D/PhoneApp( 1355): getPhone phoneId:0
D/PhoneApp( 1355): getPhone phoneId:0
I/QCOM PowerHAL( 260): Processing audio hint. Metadata: state=0
D/Mms ( 5027): sendMessage validityPeriod = -1
D/PhoneApp( 1355): getPhone phoneId:0
D/GsmDCT ( 5293): [0]isOnlySingleDcAllowed(0): false
D/GsmDCT ( 5293): [0]cleanUpConnection: X tearDown=false reason=radioTurnedOff apnContext={mApnType=mms mState=IDLE mWaitingApns={null} mWaitingApnsPermanentFailureCountDown=0 mApnSetting={null} mReason=radioTurnedOff mDataEnabled=false mDependencyMet=true} dcac=null
D/GsmDCT ( 5293): [0]cleanUpConnection: E tearDown=false reason=radioTurnedOff apnContext={mApnType=cbs mState=IDLE mWaitingApns={null} mWaitingApnsPermanentFailureCountDown=0 mApnSetting={null} mReason=radioTurnedOff mDataEnabled=false mDependencyMet=true}
D/GSMPhone( 5293): getDataConnectionState: Data is Out of Service. ret = DISCONNECTED
D/GsmDCT ( 5293): [0]isDataAllowed: not allowed due to - Attached= false - SIM not loaded and not NV subscription
D/GsmDCT ( 5293): [ApnContext:cbs] getApnSetting: apnSetting=null
D/GsmDCT ( 5293): [0]setupDataForSinglePdn: reason = radioTurnedOff isDisconnected = true
D/GsmDCT ( 5293): [0]isOnlySingleDcAllowed(0): false
D/GsmDCT ( 5293): [0]cleanUp
@ardevd
ardevd / gist:433a25ae7a5871deecf5
Created December 28, 2014 23:02
Functioning mobile data - OnePlus One Cm12
D/GsmDCT ( 1466): [0]setupDataOnConnectableApns: dataEnabled
D/GsmDCT ( 1466): [0]setupDataOnConnectableApns: apnContext {mApnType=hipri mState=IDLE mWaitingApns={null} mWaitingApnsPermanentFailureCountDown=0 mApnSetting={null} mReason=specificDisabled mDataEnabled=false mDependencyMet=true}
D/GsmDCT ( 1466): [0]setupDataOnConnectableApns: apnContext {mApnType=mms mState=IDLE mWaitingApns={null} mWaitingApnsPermanentFailureCountDown=0 mApnSetting={null} mReason=specificDisabled mDataEnabled=false mDependencyMet=true}
D/GsmDCT ( 1466): [0]setupDataOnConnectableApns: apnContext {mApnType=supl mState=IDLE mWaitingApns={null} mWaitingApnsPermanentFailureCountDown=0 mApnSetting={null} mReason=specificDisabled mDataEnabled=false mDependencyMet=true}
D/GsmDCT ( 1466): [0]setupDataOnConnectableApns: apnContext {mApnType=cbs mState=IDLE mWaitingApns={null} mWaitingApnsPermanentFailureCountDown=0 mApnSetting={null} mReason=specificDisabled mDataEnabled=false mDependencyMet=true}
D/GsmDCT ( 1466): [0]setupDataOnCo
W/PackageManager( 892): Unknown permission com.google.android.googleapps.permission.ACCESS_GOOGLE_PASSWORD in package com.android.development
W/PackageManager( 892): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH in package com.android.development
W/PackageManager( 892): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.ALL_SERVICES in package com.android.development
W/PackageManager( 892): Unknown permission com.google.android.googleapps.permission.GOOGLE_AUTH.YouTubeUser in package com.android.development
W/PackageManager( 892): Unknown permission com.android.launcher.permission.READ_SETTINGS in package com.cyanogenmod.trebuchet
W/PackageManager( 892): Unknown permission com.android.launcher.permission.WRITE_SETTINGS in package com.cyanogenmod.trebuchet
I/dex2oat ( 1193): /system/bin/dex2oat --zip-fd=11 --zip-location=/system/priv-app/Shell/Shell.apk --oat-fd=12 --oat-location=/data/dalvik-cache/arm/system@priv-app@Shell@Shell.apk@classes.dex --instructio