Skip to content

Instantly share code, notes, and snippets.

@tt024
tt024 / extensions
Last active March 22, 2023 11:40
Extensions Sync
{"user-theme@gnome-shell-extensions.gcampax.github.com":{"/org/gnome/shell/extensions/user-theme/":"[/]\nname=''"},"no-overview@fthx":{},"blur-my-shell@aunetx":{"/org/gnome/shell/extensions/blur-my-shell/":"[/]\ncolor=(1.0, 1.0, 1.0, 0.0)\ncolor-and-noise=true\nnoise-amount=0.0\nsigma=1\n\n[panel]\nstatic-blur=true","/org/gnome/shell/extensions/blur-my-shell/overview/":"","/org/gnome/shell/extensions/blur-my-shell/appfolder/":"","/org/gnome/shell/extensions/blur-my-shell/panel/":"[/]\nstatic-blur=true","/org/gnome/shell/extensions/blur-my-shell/dash-to-dock/":"","/org/gnome/shell/extensions/blur-my-shell/applications/":"","/org/gnome/shell/extensions/blur-my-shell/screenshot/":"","/org/gnome/shell/extensions/blur-my-shell/lockscreen/":"","/org/gnome/shell/extensions/blur-my-shell/window-list/":"","/org/gnome/shell/extensions/blur-my-shell/hidetopbar/":""},"dash-to-dock@micxgx.gmail.com":{"/org/gnome/shell/extensions/dash-to-dock/":"[/]\napply-custom-theme=false\nbackground-color='rgb(222,221,218)'\nbackground
@tt024
tt024 / 4chan.css
Last active February 1, 2023 15:59
:root.yotsuba-b #header-bar.dialog {
background-color: #16161a;
}
:root.yotsuba-b a {
color: #7f5af0;
}
hr {
border: none;
@tt024
tt024 / img.php
Last active May 6, 2020 19:48
Image hoster without SQL
<?php
$max_size = 512000;)
$repertory = 'uploads/';
if (isset($_FILES['file']))
{
// verify file type
if ($_FILES['file']['type'] != 'image/png' && $_FILES['file']['type'] != 'image/jpeg' && $_FILES['file']['type'] != 'image/jpg' && $_FILES['file']['type'] != 'image/gif' && $_FILES['file']['type'] != 'image/bmp' && $_FILES['file']['type'] != 'image/jpg' && $_FILES['file']['type'] != 'image/png' && $_FILES['file']['type'] != 'image/ico')
{
$error = 'Only *.jpeg, *.bmp, *.jpg, *.png, *.ico *.gif ou *.png .';
<meta http-equiv="refresh" content="5; URL=http://www.url.com">
@tt024
tt024 / index.html
Created January 3, 2020 19:23 — forked from taniarascia/index.html
HTML Skeleton file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
@tt024
tt024 / discord.js
Last active April 2, 2018 07:45
Explication des différentes lignes de codes // https://medium.com/@thxo
const Discord = require('discord.js'); // Il faut le package discord.js
const client = new Discord.Client(); // Le "client" est un nouveau client discord
client.on('ready', () => { // Quand le bot est connecté
console.log(`Logged in as ${client.user.tag}!`); // il affiche ce message dans la console
});
client.on('message', msg => { // message est défini par la variable "msg"
if (msg.content === 'ping') { // Quand un message contient "ping"
msg.reply('pong'); // le bot répond "pong" dans le salon Discord
{"139412744439988224":{"points":42,"level":0},"145978637517193216":{"points":3,"level":0},"90997305578106880":{"points":122,"level":1},"173547401905176585":{"points":999,"level":3},"233268179911049216":{"messageSent":0,"messagesSent":41},"181199915215618049":{"messageSent":0,"messagesSent":3}}
const Discord = require('discord.js')
const bot = new Discord.Client()
const TOKEN = "votre_token"
// Bot prêt
bot.on('ready', () => {
bot.user.setStatus("online"); //dnd , online , ldle
console.log("Le bot est en ligne ! \nVersion de Node: " + process.version + "\nVersion de Discord.js: " + Discord.version + "\n");
});
@tt024
tt024 / cat.js
Last active March 10, 2023 02:59
Discord.JS - Send random cat pics
const Discord = require("discord.js");
const client = new Discord.Client();
const {get} = require("snekfetch");
const TOKEN = 'YOUR_BOT_TOKEN_HERE'
const PREFIX = ";;";
client.on('message', message => {
if (message.content.startsWith(PREFIX + 'cat')) {
try {