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 -e | |
## This helper allows to create simulated objects in Bash | |
## Source: https://gist.github.com/josecanciani/c036b5c63befa4d09acb1767e2a0b889 | |
## | |
## USAGE | |
## | |
## Lets create a person with first and last name | |
## | |
## source /path/to/where/you/downloaded/object.sh |
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
// ==UserScript== | |
// @name Gitlab Merge Request Changes file filtering | |
// @namespace https://github.com/josecanciani | |
// @include https://gitlab.com/*/-/merge_requests/* | |
// @include https://*gitlab*/-/merge_requests/* | |
// @version 10 | |
// @updateURL https://gist.githubusercontent.com/josecanciani/2e6d1d0b9ce9889eb5ac480219f21e19/raw/gitlab-merge-request-diff-file-filter.user.js | |
// @author Jose Luis Canciani | |
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html | |
// @description This script will provide a filter box to add Regexp filters for files in the list |
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
// ==UserScript== | |
// @name Avature custom styles | |
// @namespace https://github.com/josecanciani | |
// @match https://*.avature.net/* | |
// @match https://obdbqa*.obfuscate.xcade.dev/* | |
// @match https://qa*.rebuild.xcade.dev/* | |
// @version 5 | |
// @author Jose Luis Canciani | |
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html | |
// @description This script applies some style changes in Avature webpages. |
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
$ time cat <<EOF | php | |
<?php | |
for (\$i = 0; \$i < 10000000; ++\$i) { | |
new Exception(\$i); | |
rand(\$i, \$i + 1000000); | |
} | |
EOF | |
real 0m2,824s | |
user 0m2,810s | |
sys 0m0,017s |
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
# All tests running inside a loop of 10 million iterations | |
# lets first try to add some code for reference. Here we are just creating a standard class | |
$ time cat <<EOF | php | |
<?php | |
for (\$i = 0; \$i < 10000000; ++\$i) { | |
\$c = new StdClass(); | |
\$c->var = \$i; | |
rand(\$i, \$i + 1000000); |
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
// ==UserScript== | |
// @name [DEPRECATED] DNA Markdown support | |
// @namespace https://github.com/josecanciani | |
// @match https://*.avature.net/DNA/* | |
// @match https://*.avature.net/_DNA/* | |
// @version 17 | |
// @deprecated Since DNA now supports Markdown, this script is useless | |
// @updateURL https://gist.githubusercontent.com/josecanciani/faca999e992f343c3c97269be664466f/raw/dna-markdown.user.js | |
// @downloadURL https://gist.githubusercontent.com/josecanciani/faca999e992f343c3c97269be664466f/raw/dna-markdown.user.js | |
// @author Jose Luis Canciani |
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/php | |
<?php | |
$file = fopen('php://stdin', 'r'); | |
$stdout = fopen('php://stdin', 'r'); | |
$lineNumber = 0; | |
$code = new Code(); | |
while (!feof($file) && ($line = fgetcsv($file)) !== false) { | |
if ($lineNumber) { // ignore header |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document regexp('https://[a-z]+\\.avature\\.net/.*') { | |
.crmui_SidebarItem{ | |
white-space: pre-line; | |
} | |
.SmallSidebarItems .crmui_SidebarItem { | |
padding: 2px 6px; |
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 | |
# A simple bash script that search all files in the current directory finding the words you put on input | |
# Searches all lines of the file | |
# Usage: google hello world | |
if [ -f .google ] | |
then | |
rm -f .google | |
fi |
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
./configure | |
# [ ... ] | |
checking for MySQL support... no | |
checking for PostgreSQL support... no | |
checking which database to use... none | |
configure: error: No supported database found. Either MySQL or PostgreSQL is required. | |
# OR: | |
checking for /lib/libz.so... no | |
checking for /usr/lib/libz.so... no | |
checking for /usr/local/lib/libz.so... no |
NewerOlder