Skip to content

Instantly share code, notes, and snippets.

View paragasu's full-sized avatar

Jeffry L paragasu

  • Kota Kinabalu, Malaysia
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paragasu
paragasu / kabang_area.geojson
Created September 29, 2022 12:21
kabang_area.geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
db.ReturnRecord.find().forEach(doc => {
if (typeof doc.created_datetime == 'string') {
console.log(typeof doc.created_datetime, doc.created_datetime);
doc.created_datetime = new Date(doc.created_datetime);
db.ReturnRecord.save(doc)
}
})

Phi Getting Started

Work ethics

  1. Bring your own laptop.
  2. Commit to GitHub all work done before leaving the office.
  3. Dress code is smart casual.

Workspace

  1. Install Debian Linux ( XFCE Window Environment) https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/current/amd64/iso-cd/ , Create bootable USB https://www.howtogeek.com/howto/linux/create-a-bootable-ubuntu-usb-flash-drive-the-easy-way/, exta firmware https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/bullseye/11.0.0/
  2. Install NodeJs https://github.com/nodesource/distributions/blob/master/README.md
@paragasu
paragasu / add_member.lua
Last active January 28, 2018 01:09
Lua add member
-- add name in the current database members list
function db.add_member(self, name)
local data, err = db:get('_security')
if not data then error(err) end
if not data.members then
data.members = {}
data.members.names = { name }
else
local current_members = data.members.names
data.members.names = table.insert(current_members, name)
[Unit]
Description=CouchDB Service
After=network.target
[Service]
Type=simple
User=couchdb
ExecStart=/opt/couchdb/bin/couchdb
Restart=on-failure
@paragasu
paragasu / battery.sh
Last active March 18, 2017 06:05
Display notifcation when battery reach critical level.
#!/bin/bash
# Author Jeffry L. <[email protected]>
# display notification when battery reach critical level
CHARGE=`acpi -b | cut -d, -f2`
VLC=`ps -e | grep vlc`
echo $CHARGE
# only play cvlc if no process exists yet
@paragasu
paragasu / battery.sh
Created March 18, 2017 05:43
Play mp3 sound once battery reach 5%
#!/bin/bash
# Author Jeffry L <[email protected]>
# 24 July 2014 Bilangau 12:47pm
# play random mp3 song once the battery reach 10%
# left
CHARGE=`acpi -b | cut -d, -f2`
VLC=`ps -e | grep vlc`
echo Battery Status: $CHARGE
table Config
FontName: Tahoma
FontSize: 8
FontColor: #ffffff
ToolTip.FontSize: 9
ToolTip.FontName: gothic
ToolTip.ForeColor: #0000FF
ToolTip.BackColor: #FFFFFF
ToolTip.CaptionOnHover: true
ToolTip.CaptionPlacement: Right