// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
'first_name' => 'Fresher',
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
| #!/bin/bash | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # Ubuntu Server | |
| export DEBIAN_FRONTEND=noninteractive | |
| echo -e "\e[96m Adding PPA \e[39m" | |
| sudo add-apt-repository -y ppa:ondrej/php |
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
| from __future__ import print_function | |
| import sys | |
| import io | |
| import pip | |
| import httplib2 | |
| import os | |
| from mimetypes import MimeTypes | |
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
| // Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
| (function poll(){ | |
| $.ajax({ url: "server", success: function(data){ | |
| //Update your dashboard gauge | |
| salesGauge.setValue(data.value); | |
| }, dataType: "json", complete: poll, timeout: 30000 }); | |
| })(); |
This is a compiled list of Laravel interview questions. If Laravel is an engineer's PHP framework of choice, they definitely have potential to be a good candidate, but a lot of new PHP engineers have been into Laravel too. The framework itself is very welcoming to newcomers, which makes it easy for beginners to feel that they know more than they really do.
1. How long have you been using Laravel?
This question can help decide what level of questions to ask.
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
| from PyPDF2 import PdfFileReader, PdfFileWriter | |
| from PyPDF2.pdf import ContentStream | |
| from PyPDF2.generic import TextStringObject, NameObject | |
| from PyPDF2.utils import b_ | |
| wm_text = 'Persönliches Exemplar von' | |
| replace_with = '' | |
| # Load PDF into pyPDF | |
| source = PdfFileReader(open('input.pdf', "rb")) |
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
| # Global variables | |
| re='^[0-9]+$' | |
| jira_name="MINT" | |
| # Will create a new branch with name ($1) from master | |
| # it will also make sure master is up to date from origin | |
| workstartFunc() { | |
| if ! [[ $1 =~ $re ]] | |
| then | |
| val=$1 |
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/env python3 | |
| import sys | |
| import re | |
| import shutil | |
| import argparse | |
| import binascii | |
| # | |
| # Author: Daxda |
This gist is about:
- https://twitter.com/taylorotwell/status/600680897550098432
- https://twitter.com/Ocramius/status/600705252539691008
Mainly:
functioncannot (should not) be used when side-effects occur