Skip to content

Instantly share code, notes, and snippets.

View fendis0709's full-sized avatar
Converting caffeine into code

Fendi fendis0709

Converting caffeine into code
View GitHub Profile
@hungthai1401
hungthai1401 / BackUpDatabase.php
Created November 2, 2018 09:47
Laravel command backup, restore postgresql database
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;
class BackUpDatabase extends Command
{
[
{
"nama":"A.H. Nasution ",
"nama2":"Jendral Besar Dr.Abdul Haris Nasution",
"kategori":"Pahlawan Nasional",
"asal":"Sumatera Utara",
"lahir":"Selasa, 3 Desember 1918 di Kotanopan, Mandailing Natal, Sumatera Utara",
"usia":"81 tahun",
"gugur":"Selasa Wage, 5 September 2000 di Jakarta, Indonesia",
"lokasimakam":"Taman Makam Pahlawan (TMP) Kalibata, Jakarta.",
@vonNiklasson
vonNiklasson / sublime3-disable-zoom.sh
Last active March 7, 2022 13:44
Disable scroll zoom in Sublime 3, by Hugh Perkins from https://superuser.com/a/1121238
cat <<EOF>~/.config/sublime-text-3/Packages/User/"Default (Linux).sublime-mousemap"
[
// Change font size with ctrl+scroll wheel
{ "button": "scroll_down", "modifiers": ["ctrl"], "command": "null" },
{ "button": "scroll_up", "modifiers": ["ctrl"], "command": "null" }
]
EOF
@xsnpdngv
xsnpdngv / cpufreq-sh
Last active September 8, 2020 08:49
Set CPU governor to powersave on Ubuntu
#!/bin/sh
sudo apt-get install cpufrequtils
echo 'GOVERNOR="powersave"' | sudo tee /etc/defaults/cpufrequtils
sudo /etc/init.d/cpufrequtils restart
cpufreq-info
@alexcorvi
alexcorvi / mime2ext.php
Created June 29, 2016 10:04
converting mime types to extension in php
function mime2ext($mime){
$all_mimes = '{"png":["image\/png","image\/x-png"],"bmp":["image\/bmp","image\/x-bmp","image\/x-bitmap","image\/x-xbitmap","image\/x-win-bitmap","image\/x-windows-bmp","image\/ms-bmp","image\/x-ms-bmp","application\/bmp","application\/x-bmp","application\/x-win-bitmap"],"gif":["image\/gif"],"jpeg":["image\/jpeg","image\/pjpeg"],"xspf":["application\/xspf+xml"],"vlc":["application\/videolan"],"wmv":["video\/x-ms-wmv","video\/x-ms-asf"],"au":["audio\/x-au"],"ac3":["audio\/ac3"],"flac":["audio\/x-flac"],"ogg":["audio\/ogg","video\/ogg","application\/ogg"],"kmz":["application\/vnd.google-earth.kmz"],"kml":["application\/vnd.google-earth.kml+xml"],"rtx":["text\/richtext"],"rtf":["text\/rtf"],"jar":["application\/java-archive","application\/x-java-application","application\/x-jar"],"zip":["application\/x-zip","application\/zip","application\/x-zip-compressed","application\/s-compressed","multipart\/x-zip"],"7zip":["application\/x-compressed"],"xml":["application\/xml","text\/xml"],"svg":
@parmentf
parmentf / GitCommitEmoji.md
Last active November 15, 2024 20:33
Git Commit message Emoji
@krhoyt
krhoyt / firebase.php
Created December 6, 2014 19:29
Interact with Firebase from PHP.
<?php
// Constants
$FIREBASE = "_YOUR_FIREBASE_URL_";
$NODE_DELETE = "temperature.json";
$NODE_GET = "temperature.json";
$NODE_PATCH = ".json";
$NODE_PUT = "temperature.json";
// Data for PUT
# sleepy flower girl
(◡ ‿ ◡ ✿)
# y u no
ლ(ಠ益ಠლ)
# smiling breasts
(^人^)
# flipping tables