- assertArrayHasKey
- assertArrayNotHasKey
- assertContains
- assertAttributeContains
- assertNotContains
- assertAttributeNotContains
- assertContainsOnly
- assertAttributeContainsOnly
- assertNotContainsOnly
- assertAttributeNotContainsOnly
| function magicMethods (clazz) { | |
| // A toggle switch for the __isset method | |
| // Needed to control "prop in instance" inside of getters | |
| let issetEnabled = true | |
| const classHandler = Object.create(null) | |
| // Trap for class instantiation | |
| classHandler.construct = (target, args) => { | |
| // Wrapped class instance |
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
| <?php | |
| /* Caveat: I'm not a PHP programmer, so this may or may | |
| * not be the most idiomatic code... | |
| * | |
| * FPDF is a free PHP library for creating PDFs: | |
| * http://www.fpdf.org/ | |
| */ | |
| require("fpdf.php"); | |
| class PDF extends FPDF { |
| let isRefreshing = false; | |
| let refreshSubscribers = []; | |
| const instance = axios.create({ | |
| baseURL: Config.API_URL, | |
| }); | |
| instance.interceptors.response.use(response => { | |
| return response; | |
| }, error => { |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
| <?php | |
| function strip_word_html($text, $allowed_tags = '<b><i><sup><sub><em><strong><u><br>') | |
| { | |
| mb_regex_encoding('UTF-8'); | |
| //replace MS special characters first | |
| $search = array('/‘/u', '/’/u', '/“/u', '/”/u', '/—/u'); | |
| $replace = array('\'', '\'', '"', '"', '-'); | |
| $text = preg_replace($search, $replace, $text); | |
| //make sure _all_ html entities are converted to the plain ascii equivalents - it appears | |
| //in some MS headers, some html entities are encoded and some aren't |
| <?php | |
| /** | |
| * UUID class | |
| * | |
| * The following class generates VALID RFC 4122 COMPLIANT | |
| * Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
| * | |
| * UUIDs generated validates using OSSP UUID Tool, and output | |
| * for named-based UUIDs are exactly the same. This is a pure | |
| * PHP implementation. |
Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.
| #!/usr/bin/bash | |
| ############################################## | |
| #from http://zeromq.org/intro:get-the-software | |
| ############################################## | |
| #get zeromq | |
| wget http://download.zeromq.org/zeromq-4.0.5.tar.gz | |
| #unpack tarball package |