Skip to content

Instantly share code, notes, and snippets.

View gaspan's full-sized avatar
🎯
Focusing

Gentur Ariyadi gaspan

🎯
Focusing
  • Ciamis
View GitHub Profile
@rjvdw
rjvdw / jquery_laravel_jsonp_example.md
Created August 30, 2016 08:43
JSONP Example With jQuery And Laravel

JSONP Example With jQuery And Laravel

javascript

$.ajax({ url: '/my-pretty-url', dataType: 'jsonP' })
  .done(function (data, textStatus, jqXHR) {
    console.log(data)
  })
  .fail(function (jqXHR, textStatus, err) {
 throw(err)
anonymous
anonymous / manytomany.db
Created July 6, 2015 17:14
Many-to-many example
# For http://stackoverflow.com/a/7296873/396458
student: student_id, first_name, last_name
classes: class_id, name, teacher_id
student_classes: class_id, student_id # the junction table
students:
id | first | last
=====================
1 | John | Lee
@jtdp
jtdp / gist:5443297
Last active March 13, 2024 12:58
See changes before pulling from remote git repository
# fetch the changes from the remote
git fetch origin
# show commit logs of changes
git log master..origin/master
# show diffs of changes
git diff master..origin/master
# apply the changes by merge..