- Create a gist if you haven't already.
- Clone your gist:
# make sure to replace `<hash>` with your gist's hash git clone https://gist.github.com/<hash>.git # with https git clone [email protected]:<hash>.git # or with ssh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Formsy, { HOC } from 'formsy-react'; | |
import { Editor } from 'react-draft-wysiwyg'; | |
import { EditorState, convertToRaw } from 'draft-js'; | |
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'; | |
import { stateToHTML } from 'draft-js-export-html'; | |
import { stateFromHTML } from 'draft-js-import-html'; | |
class Draft extends React.Component { | |
state = { | |
editorState: EditorState.createEmpty(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//status.php?id=USER_ID | |
include('db.php'); | |
if($_GET['id']) | |
{ | |
//variables | |
$id=mysqli_real_escape_string($con,$_GET["id"]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function humanDuration(number, unit = "s") { | |
let result; | |
switch (unit) { | |
case "ns": | |
result = number / 1000000; | |
if (result < 1) break; | |
number = result; | |
unit = "ms"; | |
case "ms": | |
result = number / 1000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
dist/ | |
yarn.lock | |
wwwroot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
address=https://ilo.mysite.com:34043 | |
username=Administrator | |
password=******** | |
session_key=$( | |
curl -fsS \ | |
--insecure \ | |
"$address/json/login_session" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PROGNAME=$(basename $0) | |
function usage { | |
echo "usage: $PROGNAME [-n NAMESPACE] [-m MAX-PODS] -s SERVICE -- COMMAND" | |
echo " -s SERVICE K8s service, i.e. a pod selector (required)" | |
echo " COMMAND Command to execute on the pods" | |
echo " -n NAMESPACE K8s namespace (optional)" | |
echo " -m MAX-PODS Max number of pods to run on (optional; default=all)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net; | |
using Newtonsoft.Json; | |
namespace CloudFlareApiClient | |
{ | |
class Program | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/gorilla/mux" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
DEFINE('_MINECRAFT_SERVER_DIRECTORY_','C:\Minecraft Server Files'); |