Skip to content

Instantly share code, notes, and snippets.

@mathix420
mathix420 / medium.user.js
Last active April 19, 2024 22:59
Bypass Medium Paywall - Working late 2023 - Greasy Fork, Violentmonkey, Tampermonkey - Click the RAW button to install
// ==UserScript==
// @name Medium Paywall Bypass
// @namespace Violentmonkey Scripts
// @run-at document-start
// @match *://*.medium.com/*
// @match *://medium.com/*
// @match *://*/*
// @grant none
// @version 2.3
// @inject-into content
@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active April 19, 2024 22:59
webRTC stun / turn server list
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
@khakimov
khakimov / gist:3558086
Created August 31, 2012 19:49
Matrix Effect in you terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@nickmeehan
nickmeehan / created_at_formatting.rb
Created May 19, 2014 04:23
How to format created_at in Ruby!
%a - The abbreviated weekday name (''Sun'')
%A - The full weekday name (''Sunday'')
%b - The abbreviated month name (''Jan'')
%B - The full month name (''January'')
%c - The preferred local date and time representation
%d - Day of the month (01..31)
%H - Hour of the day, 24-hour clock (00..23)
%I - Hour of the day, 12-hour clock (01..12)
%j - Day of the year (001..366)
%m - Month of the year (01..12)
@nwunderly
nwunderly / discord-scams.md
Last active April 19, 2024 22:53
Discord anti-scam blogs!

Good morning friends. As some of you might have seen, Discord released two new safety-related blog posts today! I'd highly recommend reading them both and sharing them with your communities. Wanted to give a little commentary on them as well, as someone familiar with these scams.

Protecting Against Scams on Discord

https://discord.com/blog/protecting-users-from-scams-on-discord

This is a blog acknowledging the recent surge in scams on Discord. Notably, it also mentions the FTC's report indicating an internet-wide surge in scams in 2021. It discusses general advice for both general users and for server admins and mods. It's a pretty good writeup, but it is missing some things.

"Why Would Someone Want Access to My Account?"

@DomPizzie
DomPizzie / README-Template.md
Last active April 19, 2024 22:52
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@mgd216
mgd216 / vue_nuxt_vuetify_migration.md
Last active April 19, 2024 22:52
Vue2 / Vuetify2 Migration to Vue3 / Nuxt3 / Vuetify3

Vue3 / Nuxt3 / Vuetify3 Migration Steps

  • The following notes are a 'checklist' for migrating a large Vue2 / Vuetify2 project to Vue3 / Nuxt3 / Vuetify3. It is NOT intended to be a step-by-step migration guide, they are rough notes our team used for migration
  • Our team decided to create a brand new Nuxt3 app, instead of tyring a 'bridge' or running Vue2/Vue3 side-by-side:
    • nuxi init our-new-app-v3
  • We also changed our store from Vuex to Pinia
  • We decided to use the experimental @vue/reactivity-transform. This provides the ability to use a ref in the script block without having to use .value everywhere
    • without reactivity-transform
      • let userName = ref<string>('')
      • userName.value = "John Doe"
  • with reactivity-transform
@romancitodev
romancitodev / gen-env-types.ts
Created April 19, 2024 22:43
this is a script to generate the types (only interpreted as strings) from a .env file and save it into a file `types/env.d.ts`
import fs from 'node:fs';
const ENV_FILE_PATH = '.env';
const ENV_TYPES_PATH = 'types/env.d.ts';
// Function to parse the env file
function parsefile(path: string): string[] {
const buffer = fs.readFileSync(path);
const content = buffer.toString('utf8');
const env = [];
@NikolayIT
NikolayIT / LinearRegression.cs
Created March 17, 2017 13:43
Linear regression implementation in pure C# with example of Bulgarian population prediction
namespace LinearRegression
{
using System;
using System.Diagnostics;
public static class Program
{
public static void Main()
{
var xValues = new double[]
@kingspp
kingspp / logging.py
Created April 22, 2017 07:14
Python Comprehensive Logging using YAML Configuration
import os
import yaml
import logging.config
import logging
import coloredlogs
def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'):
"""
| **@author:** Prathyush SP
| Logging Setup