Skip to content

Instantly share code, notes, and snippets.

View trinvh2's full-sized avatar

Tri Nguyen trinvh2

View GitHub Profile
# Test #
This is change logs
//! moment.js
//! version : 2.10.3
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
global.moment = factory()
public function facebook(Request $request)
{
$client = new \GuzzleHttp\Client();
$params = [
'code' => $request->input('code'),
'client_id' => $request->input('clientId'),
'redirect_uri' => $request->input('redirectUri'),
'client_secret' => config('app.facebook_secret'),
];
// Step 1. Exchange authorization code for access token.
/// <summary>
/// A listing of ASCII control characters for readability.
/// </summary>
public static class AsciiControlChars
{
/// <summary>
/// Usually indicates the end of a string.
/// </summary>
public const char Nul = (char)0x00;
@trinvh2
trinvh2 / test.js
Last active February 21, 2016 17:44
This file has been truncated, but you can view the full file.
/*! Fimplus - v1.2.3 - 17-02-2016 */
(function() {
function a(a) {
function b(b, c, d, e, f, g) {
for (; f >= 0 && g > f; f += a) {
var h = e ? e[f] : f;
d = c(d, b[h], h, b)
}
return d
}
@trinvh2
trinvh2 / radio-random-select.js
Last active February 21, 2023 09:11
Select random radio buttons
var groups = {};
$('input:radio').each(function() {
groups[this.name] = true;
});
$.each(groups, function(name, bool) {
var radios = $('input:radio[name=' + name + ']');
if(radios.length > 0) {
var rd = Math.floor(Math.random() * radios.length);
// Remove first and 2nd option
rd = ((rd + 2) < radios.length) ? rd + 2 : rd;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using Newtonsoft.Json;