- Remove multiline string into one-line
function stringToOneLine(str) { return String(str).replace(/[\t\r\n ]+/g, ' ').trim() }
{ | |
"information_for_contributors": [ | |
"This file has been converted from https://github.com/KapitanOczywisty/language-php/blob/master/grammars/php.cson", | |
"If you want to provide a fix or improvement, please create a pull request against the original repository.", | |
"Once accepted there, we are happy to receive an update request." | |
], | |
"version": "https://github.com/KapitanOczywisty/language-php/commit/5e8f000cb5a20f44f7a7a89d07ad0774031c53f3", | |
"scopeName": "source.php", | |
"patterns": [ | |
{ "include": "#attribute" }, |
#!/bin/bash | |
# Usage: check_php_syntax [directory1] [directory2] ... [directoryN] | |
# | |
# This script checks the syntax of all PHP files within the provided directories. | |
# If no directories are specified, it checks the current directory by default. | |
# | |
# Example usage: | |
# check_php_syntax # Check PHP files in the current directory | |
# check_php_syntax /path/to/dir1 # Check PHP files in a single directory |
# Let's kick things off by checking if we're already in a tmux session | |
if [[ ! -n $TMUX ]]; then | |
# Gather the mystical details of existing tmux sessions | |
session_details="$(tmux list-sessions)" | |
# Uncomment this block to create a new session if no sessions exist | |
# if [[ -z "$session_details" ]]; then | |
# tmux new-session # Bring a new session into existence! | |
# fi |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# This is how I used it: | |
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history | |
import sys | |
import time | |
#!/bin/bash | |
# ====== USAGE ====== | |
# | |
# ./tranfer_git_repository.sh <old_git_url> <target_git_url> | |
# | |
# Example: | |
# ./transfer_git_repository.sh https://<access_token>@git.example.com/Organization1/repo-name https://<access_token>@git.example.com/Organization2/repo-name | |
# Script arguments |
public class Main { | |
/** | |
* Generates a random UUID (Universally Unique Identifier) in the format: | |
* xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, where 'x' represents a random | |
* hexadecimal digit | |
* and 'y' represents a random hexadecimal digit with the 13th character set to | |
* '4' (version 4 UUID). | |
* | |
* @return The generated UUID as a string. | |
*/ |
#!/bin/bash | |
# Author: Maxwel Leite | |
# Website: http://needforbits.wordpress.com/ | |
# Description: Script to install the original Microsoft Tahoma Regular and MS Tahoma Bold (both version 2.60) on Ubuntu distros. | |
# Dependencies: wget and cabextract | |
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic | |
output_dir="/usr/share/fonts/truetype/msttcorefonts/" | |
tmp_dir="/tmp/ttf-ms-tahoma-installer" |
#!/bin/bash | |
script="myscript" | |
#Declare the number of mandatory args | |
margs=2 | |
# Common functions - BEGIN | |
function example { | |
echo -e "example: $script -m0 VAL -m1 VAL -o1 -o2 VAL" | |
} |