This file contains hidden or 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
<?php | |
namespace AppBundle\Command; | |
use Sylius\Component\Core\Model\ChannelPricingInterface; | |
use Sylius\Component\Core\Model\ProductInterface; | |
use Sylius\Component\Core\Model\ProductVariantInterface; | |
use Sylius\Component\Product\Model\ProductAssociationInterface; | |
use Sylius\Component\Product\Model\ProductAssociationTypeInterface; | |
use Sylius\Component\Taxonomy\Model\TaxonInterface; |
This file contains hidden or 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
$('#someoneelse').click(); | |
$('#patient_firstnames').val('Peter'); | |
$('#patient_lastname').val('Drumda'); | |
$('#patient_postcode').val('OX1 1AA'); | |
$('#patient_dobd').val('01'); | |
$('#patient_dobm').val('12'); | |
$('#patient_doby').val('1981'); | |
$('#patient_dob').val(${$('#patient_dobd').val()}/${$('#patient_dobm').val()}/${$('#patient_doby').val()}); | |
$('#contact_female').click(); | |
$('#proxy_relationship').val('Spouse'); |
This file contains hidden or 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
const input = 'Hello World'; | |
const filterArr = ['a','e','i','o','u']; | |
let counted = getCountFromFilteredInput(input,filterArr); | |
// 3 | |
console.log(counted.length); | |
// ["e", "o", "o"] | |
console.log(counted); | |
// Passed | |
if (assertSame(counted.length, 3)) { |
This file contains hidden or 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
'use strict'; | |
import { WebSocketServer } from 'ws'; | |
const wss = new WebSocketServer({ port: 8080 }); | |
wss.on('connection', function connection(ws) { | |
ws.on('error', console.error); | |
ws.on('message', function message(data) { |
This file contains hidden or 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
<?php | |
/* | |
Plugin Name: Abikething modify pricing display | |
Plugin URI: http://pauldrage.co.uk | |
Description: This plugin over rides the pricing display to handle GB versus ROW for tax. Requires plugin woocommerce_set_country to set $_SESSION wc_country_iso | |
Version: 1.0.0 | |
Author: Paul Drage | |
Author URI: http://pauldrage.co.uk | |
License: GPL2 etc | |
License URI: https:// |
This file contains hidden or 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
<?php | |
// i cant remember where wp-plugins live, lets assume we want everything from the level above? | |
$output = shell_exec('scp -r ../ [email protected]:/some/remote/directory/bar'); | |
// Display the scp output | |
echo "<pre>$output</pre>"; | |
?> |
This file contains hidden or 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
class PoliceMan: | |
def __init__(self, health, attack, speed): | |
self.health = health | |
self.attack = attack | |
self.speed = speed | |
self.name = 'PoliceManDEPT101' | |
# slow fat one has 100 hp, 10 attack, and moves at 25 speed | |
SlowFatOne = PoliceMan(100.00,10.00,25.00) |
This file contains hidden or 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/python3 | |
from platform import system as platform_name | |
from os import system | |
import ctypes | |
platforms_dictionary = { | |
"Windows": { # | |
"open" : 'ctypes.windll.WINMM.mciSendStringW(u"open L: type CDAudio alias L_drive", None, 0, None); ctypes.windll.WINMM.mciSendStringW(u"set L_drive door open", None, 0, None)', | |
"close": 'ctypes.windll.WINMM.mciSendStringW(u"open L: type CDAudio alias L_drive", None, 0, None); ctypes.windll.WINMM.mciSendStringW(u"set L_drive door closed", None, 0, None)' |
This file contains hidden or 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 <Servo.h> | |
#define TURN_TIME 1200 | |
Servo toolheadServo; | |
int toolheadHome = 0; | |
boolean toolheadGoingHome = false; | |
int discContact = 0; |
This file contains hidden or 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
void setup() { | |
//start serial connection | |
Serial.begin(9600); | |
//configure pin 2 as an input and enable the internal pull-up resistor | |
pinMode(2, INPUT_PULLUP); | |
pinMode(13, OUTPUT); | |
} | |
void loop() { |
NewerOlder