Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members.
Source: When to use self vs this -stackoverflow
Located in alphabetical order (not prefer)
C
ab
), also designed as a more modern replacement, written in C
golang
)/** @jsx React.DOM */ | |
var STATES = [ | |
'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', | |
'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', | |
'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', | |
'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY' | |
] | |
var Example = React.createClass({ |
// MIT License - Copyright (c) 2016 Can Güney Aksakalli | |
// https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Net.Sockets; | |
using System.Net; | |
using System.IO; |
function retrieveEnvHostName() { | |
var injectedMstScriptTag = document.getElementById('ms-transfer-api'); | |
var success = false; | |
var exceptionMsg; | |
if (injectedMstScriptTag == undefined || injectedMstScriptTag == null || injectedMstScriptTag == '') { | |
exceptionMsg = "Fatal error: Could not retrieve script tag ms-transfer-api!"; | |
} else { | |
Signiant.Mst.envHostName = (injectedMstScriptTag).getAttribute('env-host-name'); | |
if (Signiant.Mst.envHostName === undefined || Signiant.Mst.envHostName == null || Signiant.Mst.envHostName.length == 0) { | |
exceptionMsg = "Fatal error: Could not retrieve env-host-name from script tag ms-transfer-api!"; |
// by Erik Wrenholt | |
import java.util.*; | |
class Mandelbrot | |
{ | |
static int BAILOUT = 16; | |
static int MAX_ITERATIONS = 1000; | |
private static int iterate(float x, float y) | |
{ |
using UnityEngine; | |
using System.Collections; | |
using UnityEditor; | |
using System.IO; | |
public class SDKSwap : EditorWindow { | |
static string _cardboardPath; | |
static string _OVRPath; |