Skip to content

Instantly share code, notes, and snippets.

@puiutucutu
puiutucutu / appEntryPoint.js
Created January 29, 2018 01:43 — forked from markerikson/appEntryPoint.js
Webpack React/Redux Hot Module Reloading (HMR) example
import React from "react";
import ReactDOM from "react-dom";
import configureStore from "./store/configureStore";
const store = configureStore();
const rootEl = document.getElementById("root");
@puiutucutu
puiutucutu / Unicode table
Created January 22, 2018 05:56 — forked from ivandrofly/Unicode table
Unicode table - List of most common Unicode characters *
Unicode table - List of most common Unicode characters *
* This summary list contains about 2000 characters for most common ocidental/latin languages and most printable symbols but not chinese, japanese, arab, archaic and some unprintable.
Contains character codes in HEX (hexadecimal), decimal number, name/description and corresponding printable symbol.
What is Unicode?
Unicode is a standard created to define letters of all languages ​​and characters such as punctuation and technical symbols. Today, UNICODE (UTF-8) is the most used character set encoding (used by almost 70% of websites, in 2013). The second most used character set is ISO-8859-1 (about 20% of websites), but this old encoding format is being replaced by Unicode.
How to identify the Unicode number for a character?
Type or paste a character:
@puiutucutu
puiutucutu / Array.prototype.compare.js
Created August 18, 2017 14:07 — forked from ain/Array.prototype.compare.js
JavaScript compare() method for Array
Array.prototype.compare = function(array) {
if (!array) {
return false;
}
if (this.length !== array.length) {
return false;
}
for (var i = 0, l = this.length; i < l; i++) {
if (this[i] instanceof Array && array[i] instanceof Array) {
if (!this[i].compare(array[i])) {
@puiutucutu
puiutucutu / 0_reuse_code.js
Created April 26, 2017 04:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@puiutucutu
puiutucutu / DropdownMenu.jsx
Created March 2, 2017 15:51 — forked from zackperdue/DropdownMenu.jsx
ReactJS Dropdown Menu with optgroup
import React from 'react';
var SelectInput = React.createClass({
propTypes: {
groupBy: React.PropTypes.string,
options: React.PropTypes.array.isRequired,
placeholder: React.PropTypes.string,
selected: React.PropTypes.string
},
@puiutucutu
puiutucutu / .htaccess
Created April 4, 2016 07:49 — forked from julkue/.htaccess
Default .htaccess with configuration redirects to app.php
#/*!***************************************************
#* The MIT License (MIT)
#*
#* Copyright (c) 2014-2016, Julian Motz
#*
#* Permission is hereby granted, free of charge, to any person obtaining a copy
#* of this software and associated documentation files (the "Software"), to deal
#* in the Software without restriction, including without limitation the rights
#* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#* copies of the Software, and to permit persons to whom the Software is
@puiutucutu
puiutucutu / filter_var_array.php
Created February 26, 2016 21:34 — forked from franz-josef-kaiser/filter_var_array.php
PHP filter_var_array() example
<?php
namespace WCM;
# USES PHP 5.3 + Closures
// No white surrounding space
$data = array_map( 'trim', $_POST['foo'] );
$data = filter_var_array( $data, array(
@puiutucutu
puiutucutu / add-option-to-dropdown.js
Created October 6, 2015 18:27 — forked from paulund/add-option-to-dropdown.js
Add and Remove Options in Select using jQuery
$("#selectBox").append('<option value="option6">option6</option>');
@puiutucutu
puiutucutu / curl.php
Created October 1, 2015 15:36 — forked from f0t0n/curl.php
Using php curl with CURLOPT_USERAGENT option
<?php
$username='h2odev';
$password='likewater';
$location='http://h2odev.law.harvard.edu/playlists/151';
$baseUrl = 'http://h2odev.law.harvard.edu/';
$currDir = dirname(__FILE__) . DIRECTORY_SEPARATOR;
$userAgent = require($currDir . 'cuseragent.php');
$ch = curl_init ();