Skip to content

Instantly share code, notes, and snippets.

Tkc tkc

  • Japan
Block or report user

Report or block tkc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tkc / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
tkc /
Last active Aug 29, 2015
angular post
app.controller('ModalInstanceCtrl', function ($scope, $modalInstance, $http, guest) {

    $scope.item = guest;

    $ = function () {

        var req = {
            method: 'POST',
tkc /
Created Aug 20, 2015
<SCRIPT language="JavaScript"> = {
'user_id':<?php echo Auth::user()->id ?>,
'article_id':<?php echo $article->id ?>
View gist:3af2c208a5c16ad2aee0
The username and password for both databases is homestead / secret.
View ng-init
View $scope.init
// register controller in html
<div data-ng-controller="myCtrl" data-ng-init="init()"></div>
// in controller
$scope.init = function () {
// check if there is query in url
// and fire search in case its value is not empty
View new Date($
$ = data; // get row data
$ = new Date($; // convert filed to date
sample code
View modal size
.xx-dialog .modal-dialog {
width :90%;
min-width: 800px;
modalInstance = ${
templateUrl: 'templates/editxxx.html',
controller: EditXXCtrl,
windowClass: 'xx-dialog',
resolve: {
View anguler modal resolve sample
$scope.modalOpen = function (_id) {
var modalInstance = ${
animation: true,
templateUrl: 'myModalContent.html',
controller: 'ModalInstanceCtrl',
size: 'lg',
resolve: {
_id: function () {
return _id;
You can’t perform that action at this time.