Skip to content

Instantly share code, notes, and snippets.

View Bazsmagister's full-sized avatar
🎯
Focusing

Bazsmagister

🎯
Focusing
View GitHub Profile
@douglas
douglas / update_git_repos.sh
Created October 14, 2011 15:04
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@barryvdh
barryvdh / _ide_helper.php
Last active May 6, 2024 07:45
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@thegitfather
thegitfather / http-status-codes.js
Last active July 12, 2024 20:38
http status codes
var httpStatusCodes = {
// 1xx Informational
// Request received, continuing process.[2]
// This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. Since HTTP/1.0 did not define any 1xx status codes, servers must not send a 1xx response to an HTTP/1.0 client except under experimental conditions.
'100': 'Continue', //This means that the server has received the request headers, and that the client should proceed to send the request body (in the case of a request for which a body needs to be sent; for example, a POST request). If the request body is large, sending it to a server when a request has already been rejected based upon inappropriate headers is inefficient. To have a server check if the request could be accepted based on the request's headers alone, a client must send Expect: 100-continue as a header in its initial request[2] and check if a 100 Continue status code is received in response be
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active July 16, 2024 15:33
Vanilla JavaScript Quick Reference / Cheatsheet
@Emp3r
Emp3r / bootstrap-basic-form.sublime-snippet
Created March 7, 2017 17:04
Bootstrap form snippets for Sublime Text, prepared for Laravel with "old()" function set in values.
<snippet>
<content><![CDATA[
<form method="${1:POST}" action="${2:/}">
${3:{{ csrf_field() \}\}}
<div class="form-group">
<label for="${4:name}">${5:Name}:</label>
<input type="text" class="form-control" name="${4:name}" id="${4:name}" ${6:required }value="${7:{{ old('${4:name}') \}\}}">
</div>
@justsml
justsml / fetch-api-examples.md
Last active July 8, 2024 17:26
JavaScript Fetch API Examples
@NBZ4live
NBZ4live / 2018_02_07_101510_migrate_to_utf8mb4.php
Created February 7, 2018 11:56
Laravel migration to migrate the database from utf8 to utf8mb4
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class MigrateToUtf8mb4 extends Migration
{
/**
* Run the migrations.
@bradtraversy
bradtraversy / sample.md
Created March 23, 2018 18:17
Markdown Cheat Sheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic

@bradtraversy
bradtraversy / myscript.sh
Last active July 16, 2024 10:39
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"