Skip to content

Instantly share code, notes, and snippets.

Chris Ian Fiel ccfiel

  • Cagayan de Oro
Block or report user

Report or block ccfiel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View options
[0] WebSocket {
[0] domain: null,
[0] _events:
[0] { close: [ [Function], [Object] ],
[0] error: [Function],
[0] pong: [Function: heartbeat] },
[0] _eventsCount: 3,
[0] _maxListeners: undefined,
[0] readyState: 1,
[0] protocol: '',
View backlight
#!/bin/bash
WORKDIR=/home/chris/
LOGFILE=/tmp/backlight.log
KBDBACKLIGHT=`cat /sys/devices/platform/asus-nb-wmi/leds/asus::kbd_backlight/brightness`
HOUR=`date +%H`
echo "---------------->" | tee -a $LOGFILE
View pusoy
const north = new Player('north', new Hand([
new PlayingCard(CardName.Jack, Suit.Diamonds),
new PlayingCard(CardName.Jack, Suit.Hearts),
new PlayingCard(CardName.Queen, Suit.Clubs),
]));
const east = new Player('east', new Hand([
new PlayingCard(CardName.King, Suit.Diamonds),
new PlayingCard(CardName.Nine, Suit.Spades),
new PlayingCard(CardName.Two, Suit.Hearts),
]));
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@ccfiel
ccfiel / README.md
Last active Jun 13, 2018 — forked from peterp/README.md
Installing React-Native on Ubuntu
View README.md

First, you'll need NodeJS and NPM:

sudo apt install curl
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
nodejs -v
v8.4.0
View test.lua
-- main.lua --
conta = 0
litro = 0
pin = 2 --> GPIO4
-- Connect
print('\nInitializing...main.lua\n')
tmr.alarm(0, 1000, 1, function()
if wifi.sta.getip() == nil then
print("Connecting to AP...\n")
View anecdotal_note.js
frappe.ui.form.on("Anecdotal Note", "student", function (frm, cdt, cdn) {
frappe.call({
method: "wela.disciplinary_notes.doctype.anecdotal_note.anecdotal_note.get_student_summary",
args: {
"student": frm.doc.student
},
callback: function (r) {
frm.set_value("summary", r.message["result"]);
frm.set_value("contact_numbers", r.message["contact_numbers"]);
}
View enrollees.js
frappe.ui.form.on("Enrollees", "status", function(frm) {
frm.toggle_display("student", frm.doc.status == "Continuing" || frm.doc.status == "Returnee");
return frappe.call({
method: "wela.registration.doctype.enrollees.enrollees.generate_id_number",
args: {
"status": frm.doc.status
},
callback: function(r, rt) {
if(r.message) {
if (frm.doc.status == 'New' || frm.doc.status == 'Transferee') {
View enrollees.js
console.log("oooooooooooooooooooooo");
frappe.ui.form.on("Enrollees", "status", function(frm) {
frm.toggle_display("student", frm.doc.status == "Continuing" || frm.doc.status == "Returnee");
return frappe.call({
method: "wela.registration.doctype.enrollees.enrollees.generate_id_number",
args: {
"status": frm.doc.status
},
callback: function(r, rt) {
if(r.message) {
View rental_transaction.js
function toggle_fields(frm) {
frm.toggle_reqd("customer", frm.doc.transaction_type == "Rent");
frm.toggle_reqd("deposit_amount", frm.doc.transaction_type == "Rent");
frm.toggle_display("customer", frm.doc.transaction_type == "Rent");
frm.toggle_display("deposit_amount", frm.doc.transaction_type == "Rent");
frm.toggle_reqd("tenant", frm.doc.transaction_type == "Vacate");
frm.toggle_reqd("balance", frm.doc.transaction_type == "Vacate");
frm.toggle_display("tenant", frm.doc.transaction_type == "Vacate");
frm.toggle_display("balance", frm.doc.transaction_type == "Vacate");
You can’t perform that action at this time.