Skip to content

Instantly share code, notes, and snippets.

View TriHydera's full-sized avatar

TriHydera TriHydera

View GitHub Profile
@schacon
schacon / gist:1
Created July 15, 2008 18:17
the meaning of gist
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
@rxaviers
rxaviers / gist:7360908
Last active August 11, 2026 17:31
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@liabru
liabru / save-file-local.js
Created April 24, 2014 17:46
Save a text file locally with a filename, by triggering a download in JavaScript
/*
* Save a text file locally with a filename by triggering a download
*/
var text = "hello world",
blob = new Blob([text], { type: 'text/plain' }),
anchor = document.createElement('a');
anchor.download = "hello.txt";
anchor.href = (window.webkitURL || window.URL).createObjectURL(blob);
@depoulo
depoulo / gif.php
Last active December 24, 2023 17:20
Get random gif from Giphy - might be against their TOS, please check yourself and use reasonably - I use it for our continuos integration status monitor, which of course is almost never red ;)
// get random image from Giphy
function getRandomGif($topic = 'fail') {
$data = file_get_contents("http://giphy.com/search/$topic");
preg_match_all('@href="/gifs/(.*?)"@', $data, &$matches);
$gifId = $matches[1][array_rand($matches[1])];
return "http://media2.giphy.com/media/$gifId/giphy.gif";
}
@daveajones
daveajones / jsonfeed2rss.php
Last active September 14, 2025 19:41
Convert JSONFeed to RSS
<?php
//Convert JSONfeed to RSS in a single function as a drop-in to make adding JSONfeed
//support to an aggregator easier
function convert_jsonfeed_to_rss($content = NULL, $max = NULL)
{
//Test if the content is actual JSON
json_decode($content);
if( json_last_error() !== JSON_ERROR_NONE) return FALSE;
@fadziljusri
fadziljusri / hobbies.json
Created March 3, 2018 00:29
A list of hobbies in JSON
[
{
"hobby": "3D printing"
},
{
"hobby": "amateur radio"
},
{
"hobby": "Scrapbook"
},
@navono
navono / jsonParser.bat
Last active September 14, 2025 19:40
parse JSON file by windows batch
:: Read file "package.json" into variable string, removing line breaks.
set string=
for /f "delims=" %%x in (package.json) do set "string=!string!%%x"
rem Remove quotes
set string=%string:"=%
rem Remove braces
set "string=%string:~2,-2%"
rem Change colon+space by equal-sign
set "string=%string:: ==%"
[
{
"title": "3D printing",
"category": "General",
"subCategory": "Indoors"
},
{
"title": "Acrobatics",
"category": "General",
"subCategory": "Indoors"
@GabrielMMelo
GabrielMMelo / fast_notes_vim.cmd
Last active April 1, 2022 09:28
Batch file for start fast vim notes on Windows
@ECHO OFF
set yy=%date:~6,4%
set mm=%date:~3,2%
set dd=%date:~0,2%
SET today=%dd%-%mm%-%yy%
set hh=%time:~0,2%
set MM=%time:~3,2%
SET now=%hh%:%MM%
@Supercip971
Supercip971 / submodule-updater.yml
Last active September 6, 2023 17:11
update all your submodule when you want with this github action !
name: update all submodules
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0