Skip to content

Instantly share code, notes, and snippets.

/* Add this to your css for debuggin purpose */
body:after {
content: "no mq";
position: fixed;
bottom: 0;
right: 0;
z-index: 999;
padding: 2px 5px;
background-color: rgba(0,0,0,.7);
color: white;
@danyeah
danyeah / optimize.sh
Created December 22, 2015 09:22
Bulk mozjpeg optimizer
#! /bin/sh
#this is where your files will be put
mkdir originals
# I run mozjpeg for everyfile in this dir, adding the suffix .tmp, and move the original file in /originals
for f in ./*.jpg;
do
mozjpeg -optimize -outfile $f.tmp $f;
mv $f originals/$f;
@danyeah
danyeah / cycle_gridle_states.scss
Created June 28, 2017 19:53
Cycle all the gridle states
$statesNames : gridle_get_states_names();
%alignleft,
.alignleft {
float: left;
@each $name in $statesNames {
&--#{$name} {
@include gridle_state($name) {
float: left;
}
@danyeah
danyeah / current-template.php
Created September 20, 2017 07:56
Wordpress current template
// Outputs the template used
// Usage: echo get_current_template(true);
// Credits: http://www.kevinleary.net/get-current-theme-template-filename-wordpress/
function define_current_template( $template ) {
$GLOBALS['current_theme_template'] = basename($template);
return $template;
}
function get_current_template( $echo = false ) {
@danyeah
danyeah / abi.json
Created December 19, 2023 10:01
MORALIS GET CONTRACT EVENTS
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "campaignId",
"type": "uint256"
},
{
@danyeah
danyeah / transakInit
Created September 30, 2024 08:30
TRANSAK CONFIG FLUTTER APP
{
"apiKey":"<API-KEY>",
"environment":"STAGING",
"sourceTokenData":[
{
"sourceTokenCode":"USDC_TOB",
"sourceTokenAmount":7.6
}
],
"disablePaymentMethods":"sepa_bank_transfer",