Skip to content

Instantly share code, notes, and snippets.

View umair-mirza's full-sized avatar

Umair M. umair-mirza

View GitHub Profile
@rubelmiah
rubelmiah / show_current_user_attachments.php
Last active January 26, 2023 06:34
Besides administrator show only the current user media files
<?php
//Besides administrator show only the current user media files
function show_current_user_attachments( $query ) {
if ( ! current_user_can('administrator') ) {
$user_id = get_current_user_id();
if ( $user_id ) {
$query['author'] = $user_id;
}
}
@loadchange
loadchange / .prettierrc.json
Created January 25, 2023 08:16
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
@vlazar-
vlazar- / rjesenje1.html
Created January 24, 2023 11:48
JavaScript - prijestupna godina
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Prijestupna Godina</title>
</head>

Benchmark was compiled using the following compiler:

GCC version 12.2.0

Benchmark was compiled with the following options:

-mabi=lp64d -mcpu=sifive-s76 -misa-spec=20191213 -march=rv64ifd_zicsr -O3 -ffree-line-length-none -fpre-include=/usr/include/finclude/riscv64-linux-gnu/math-vector-fortran.h
// Publish publishes a message to a topic
func (b *Agent) Publish(topic string, msg string) {
b.mu.Lock()
defer b.mu.Unlock()
if b.closed {
return
}
for _, ch := range b.subs[topic] {
@juanemael
juanemael / metadata.json
Last active January 9, 2023 13:18
Marlowe Meet 1 - 3
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
nix-env failed:
error: anonymous function at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-1/pkgs/development/compilers/gcc/9/default.nix:1:1 called with unexpected argument 'enableExternalBootstrap'
at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-1/lib/customisation.nix:80:16:
79| let
80| result = f origArgs;
| ^
81|
@gengarizzy
gengarizzy / Ejercicio2.java
Created January 4, 2023 06:06
Ejercicio2JavaFunciones
package Ejercicio2Funciones;
import java.util.Scanner;
public class Ejercicio2 {
public static void main(String[] args) {
//TOMO EL PRECIO Y EL IVA MEDIANTE LA CONSOLA
@wotakuro
wotakuro / WebGLUtility.cs
Last active January 4, 2023 08:40
Unity WebGLUtility
using UnityEngine;
using UnityEditor;
using System;
using System.Reflection;
namespace UTJ
{
public class WebGLUtility
{
private static Type httpServerEditorWrapperType;
{"embeddings": [{"tensorName": "WebVectors", "tensorShape": [300, 7], "tensorPath": "https://gist.githubusercontent.com/akutuzov/136cb30927e6a3d451bcd55f8df6a355/raw/8941096d42a5b5bf1f4e8d6ec9b06ea2a8f50278/MOD_enwiki_upos_skipgram_300_2_2021_ce9a3ede578d090c5ff3840ef9dd3b69_tsne_tensor.tsv", "metadataPath": "https://gist.githubusercontent.com/akutuzov/40202c5c9354439470aab17d99e0e0b7/raw/34e3661b64eeb683834cf2e3c33fde1a137dfe51/MOD_enwiki_upos_skipgram_300_2_2021_ce9a3ede578d090c5ff3840ef9dd3b69_tsne_metadata.tsv"}]}