Skip to content

Instantly share code, notes, and snippets.

@zerobugs-oficial
zerobugs-oficial / conexao.php
Created September 9, 2021 11:05
Sistema de Busca Simples usando PHP e MySQL
<?php
$host = "localhost";
$db = "carros";
$user = "root";
$pass = "";
$mysqli = new mysqli($host, $user, $pass, $db);
if($mysqli->connect_errno) {
die("Falha na conexão com o banco de dados");
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active May 22, 2024 02:05
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

1. Install oh-my-zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
2. Clone necessary plugins.
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
3. Add plugins to ~/.zshrc as
plugins = ( [plugins...] zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting)
@realvjy
realvjy / ChoasLinesShader.metal
Last active May 22, 2024 01:56
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@brcha
brcha / vcvars.ps1
Created May 22, 2024 01:51
vcvars.ps1
# Allow executing CMD scripts
function Invoke-CmdScript {
param(
[String] $scriptName
)
$cmdLine = """$scriptName"" $args & set"
& $Env:SystemRoot\system32\cmd.exe /c $cmdLine |
select-string '^([^=]*)=(.*)$' | foreach-object {
$varName = $_.Matches[0].Groups[1].Value
$varValue = $_.Matches[0].Groups[2].Value
@jiji0302
jiji0302 / index.html
Last active May 22, 2024 01:48
WYSIWYG AI Loading
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Arvo&family=Inconsolata:wght@400;500;700&display=swap" rel="stylesheet">
<div>
<div class="blob"><h1>Thinking...</h1></div>
<div class="blob1"></div>
<div class="blob2"></div>
<div class="blob3">
</div>
</div>
@voluntas
voluntas / gist:73efe2f36ac1513c02a8
Created August 5, 2012 16:13
レビューのススメ?

レビューのススメ?

typo 死ぬほど多いので突っ込みまってます

バージョン

0.2.3

作者

@voluntas

考え方はコロコロ変わるタイプなのですが、最近はレビューが実はとても大事でとにもかくにもレビューなのでは?と思い始めてきています。

@hanjeahwan
hanjeahwan / monokai-neon-glow.css
Last active May 22, 2024 01:45
VSCode Custom CSS - Monokai Neon Glow Syntax
.mtk1 {
color: #f8f8f2;
text-shadow: 0 0 2px rgba(0, 0, 0, 0), 0 0 3px rgba(0, 0, 0, 0), 0 0 5px rgba(0, 0, 0, 0), 0 0 8px #f8f8f2;
}
.mtk4 {
color: #fdfdfd;
text-shadow: 0 0 2px #03edf975, 0 0 4px #03edf975, 0 0 6px #03edf975, 0 0 8px #03edf975;
}
@lsloan
lsloan / pycon_pdf_to_png.py
Last active May 22, 2024 01:41
A small program to convert the PDF of the PyCon US 2024 venue map to individual PNG images.
import urllib.request
import pymupdf # pip install PyMuPDF
url = ('https://pycon-assets.s3.amazonaws.com/2024/media/'
'documents/DLCC-Floorplan-Marked_up_PyCon_US_2024.pdf')
# url = 'file:DLCC-Floorplan-Marked_up_PyCon_US_2024.pdf'
with urllib.request.urlopen(url) as response:
pdfStream = response.read()