Skip to content

Instantly share code, notes, and snippets.

@victorleejw
victorleejw / erc20token.sol
Last active November 28, 2023 11:46
Erc20 Smart Contract for a Standard, Capped, Mintable, Burnable, Payable Token.
// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/GSN/Context.sol
// https://ropsten.etherscan.io/address/0x8df55a60a1c98281a60d6c89f59398bee854fbc8#code
pragma solidity ^0.6.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
@Cyclenerd
Cyclenerd / index.html
Created August 22, 2019 06:40
Static (with no PHP or other server-side scripting) Speedtest
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML5 Speedtest</title>
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="favicon.ico">
<script src="speedtest.js"></script>
<script>
function I(i){return document.getElementById(i);}
@NathanJGaul
NathanJGaul / LICENSE.txt
Created December 10, 2018 06:29 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@fracz
fracz / Readme.md
Last active May 2, 2023 07:25
Restore intentionally deleted commits in Git

Restore intentionally deleted commits in Git (remote)

Situation

  1. You own a Git repository server and the developers do not have access to it (i.e. they can only read & write to the repo, but not gc it).
  2. You had a developer that wrote a project for you.
  3. He got angry for whatever reason and deleted all branches from the remote repo. He also push -fed the master branch leaving only one silly commit there.
  4. He escaped from the country leaving you without any code at all (at least this is what he believe in).
  5. You have never cloned the repo to other machine. There were only two copies of it: the developer's one and the server's one.
@primaryobjects
primaryobjects / m3u8.md
Last active May 3, 2024 02:44
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
@jeffochoa
jeffochoa / Response.php
Last active May 4, 2024 08:50
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
const fse = require('fs-extra')
const path = require('path')
const { promisify } = require('util')
const ejsRenderFile = promisify(require('ejs').renderFile)
const globP = promisify(require('glob'))
const config = require('../site.config')
const srcPath = './src'
const distPath = './public'
anonymous
anonymous / iyodasu.md
Created July 10, 2017 23:37
free fix for ftp download sites uploaded.to

free fix for ftp download sites uploaded.to

click to upload. Store & share your files with uploaded.net Learn more about our services (video) 30/8/2012 · Video embedded · Standard YouTube License;. Download From Uploaded.to For Free. How to use Premium Cookie From All Filehosting sites [Hotfile,Uploaded.to. How do I upload files to my website? You must either use FTP (file transfer protocol) client, or upload via our File Manager located in your cPanel area. Uploading a video to the web is easy when you're prepared.. and there are many other similar free video sharing sites.. What Does Upload and Download Really … How to U
@bep
bep / hugo-on-android.md
Last active April 26, 2024 04:13
Run Hugo on an Android phone

First install Termux

Then there are two options:

Build from source

Open the Termux terminal on your Android device and copy-and-paste the commands listed below and hit ENTER:

@pixelbrackets
pixelbrackets / api.php
Last active October 27, 2023 19:13
Simple PHP script to test and use cURL
<?php
/**
* Simple request response script
*
* Point you cURL request to this script to see all incoming data
*/
echo '*API*'. PHP_EOL;