Skip to content

Instantly share code, notes, and snippets.

View nunomazer's full-sized avatar
🎯
Coding ... allways

Ademir Mazer Jr [ Nuno ] nunomazer

🎯
Coding ... allways
View GitHub Profile
var base_path = __dirname.replace('resources/node', '');
require('dotenv').config({
path: base_path + '.env'
});
var env = process.env;
/* Illuminate\Auth\SessionGuard@getName */
var loginSHA1 = 'login_web_59ba36addc2b2f9401580f014c7f58ea4e30989d';
@blacksmoke26
blacksmoke26 / timezone-list.php
Created March 29, 2016 11:10
List of timezones (PHP)
<?php
$listOfTimeZones = [
'Africa'=> [
'Africa/Algiers'=>'Algeria (+01:00)',
'Africa/Gaborone'=>'Botswana (+02:00)',
'Africa/Douala'=>'Cameroon (+01:00)',
'Africa/Bangui'=>'Central African Republic (+01:00)',
'Africa/Ndjamena'=>'Chad (+01:00)',
'Africa/Kinshasa'=>'Democratic Republic of the Congo (+01:00)',
@gokulkrishh
gokulkrishh / media-query.css
Last active May 7, 2025 06:24
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@capaj
capaj / app-config.js
Created May 27, 2015 09:07
useful config for your angular apps
app.config(function($compileProvider) {
if (!location.host.match(/localhost/)) {
$compileProvider.debugInfoEnabled(false);
}
})
@nsilvah
nsilvah / gist:a7a31f017de098a79f38
Created April 24, 2015 15:23
DatePicker directive to fix timezone issues
app.directive('datepickerLocaldate', [function () {
var directive = {
require: 'ngModel',
link: link
};
return directive;
function link(scope, element, attr, ngModel) {
var converted = false;
scope.$watch(
@johnhout
johnhout / setup_laravel.sh
Last active September 4, 2015 16:32
Laravel 5 quick install bash!
#!/bin/sh
# Laravel 5 new project setup bash script.
# Inspired by Mitchell van Wijngaarden
# Extended by John in 't Hout
projectname=$1
git clone -o laravel -b develop https://github.com/laravel/laravel.git ${projectname} >/dev/null
cd ${projectname}
git checkout --orphan master
@weberste
weberste / gist:354a3f0a9ea58e0ea0de
Last active February 23, 2025 19:18
Dates only with Angular-UI Bootstrap datepicker
app.directive('datepickerLocaldate', ['$parse', function ($parse) {
var directive = {
restrict: 'A',
require: ['ngModel'],
link: link
};
return directive;
function link(scope, element, attr, ctrls) {
var ngModelController = ctrls[0];
@mathematicalcoffee
mathematicalcoffee / chapter.hs
Last active February 23, 2021 07:10
Pandoc extension to insert the metadata of a file as headings of levels 1, 2 and 3. This is so that if you have (say) each chapter of a thesis in its own file with its own title block, you can still compile the lot together to the one final thesis. See the file for more details.
#!/usr/bin/env runhaskell
-- Filter that adds the metadata block as h1, h2, h3 (title, author, date).
--
-- Usage::
-- chmod +x ./chapter.hs
--
-- # (where each chapter is in its own md file and I want to compile them
-- # into one document preserving the title/author/date for each chapter):
--
-- for f in Chapter*.md; do \
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@anlutro
anlutro / install.bash
Last active May 7, 2019 05:07
Simple Laravel 4 deployment using git hooks and shell scripts
#!/usr/bin/env bash
set -e
# function to easily determine if a set of programs and files are available.
function deploy_programs_available {
local programs=(npm bower grunt)
local files=(package.json bower.json Gruntfile.js)
for p in ${programs[@]}; do