Skip to content

Instantly share code, notes, and snippets.

View anovsiradj's full-sized avatar

MDMCDC anovsiradj

View GitHub Profile
@forecho
forecho / SearchModel.php
Last active July 15, 2022 11:14
Yii2 Search Model
<?php
/**
* author : forecho <caizhenghai@gmail.com>
* createTime : 2015/12/29 15:33
* description:
*/
namespace common\components;
use yii\base\InvalidParamException;
@brunogaspar
brunogaspar / README.md
Last active October 7, 2022 09:08
Install wkhtmltopdf on Ubuntu (14.04 64-bit) or (16.04 64-bit)

Install wkhtmltopdf on Ubuntu

This was tested on:

  • Ubuntu 14.04 x64
  • Ubuntu 16.04 x64

Installation

@evanwill
evanwill / gitBash_windows.md
Last active March 25, 2024 15:48
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

<html>
<head>
<style>
.item {width:300px; display: inline-block; }
.item .itemtitle {font-weight:bold; font-size:2em;}
.hidden {display:none;}
</style>
</head>
<body>
<h1>Amalgam Comics Characters</h1>
@logrusorgru
logrusorgru / mysql.sql
Last active January 16, 2024 07:01
SQL: uniqueness, automatic created_at, updated_at refresh + soft delete. SQLite, PostgreSQL, MySQL
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
-- mysql --
-- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- mysql <http://sqlfiddle.com/#!9/91afb5/2>
-- note: sqlfiddle is very stupid
@lopspower
lopspower / README.md
Last active March 28, 2024 20:45
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

state region pop SATV SATM percent dollars pay
AL ESC 4041 470 514 8 3.648 27
AK PAC 550 438 476 42 7.887 43
AZ MTN 3665 445 497 25 4.231 30
AR WSC 2351 470 511 6 3.334 23
CA PAC 29760 419 484 45 4.826 39
CO MTN 3294 456 513 28 4.809 31
CT NE 3287 430 471 74 7.914 43
DE SA 666 433 470 58 6.016 35
DC SA 607 409 441 68 8.21 39
@ignaciotcrespo
ignaciotcrespo / git_clone_branch_only.sh
Last active March 13, 2024 04:04
git clone a specific branch, ONLY the latest commit without history, and wipe out folder before
# wipe out folder. Added manually the .git folders due to cant find a good command to delete everything in macos & linux
rm -rf .git
rm -rf .git*
rm -rf ./*
# clone branch, fast way to get a specific branch without the complete history
git clone -b ${BRANCH_TO_BUILD} --depth 1 --single-branch ${REPO_URL} .
@tomysmile
tomysmile / laravel-add-createdby.md
Created January 11, 2016 07:49
Laravel: Adding Created_By
<?php

namespace App;

use Auth;
use Illuminate\Database\Eloquent\Model as Eloquent;

class BaseModel extends Eloquent{
 
@danielantelo
danielantelo / microdata_resume_cv.html
Last active July 6, 2023 09:48
HTML5 Microdata Resume (Curriculum) Template
<!DOCTYPE html>
<html>
<head>
<!-- Meta conf -->
<meta charset="UTF-8">
<!-- Meta info -->
<title>HTML5 Microdata Resume (CV) Template</title>
<meta name="description" content="An example of how to layout a semantic html5 page for a curriculum vitae/resume">
<meta name="keywords" content="template, html, semantic, microdata, resume, cv, curriculum, vitae">
</head>