Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

Discover gists

@isaacs
isaacs /comma-first-var.js
CreatedApril 6, 2010 19:24
A better coding convention for lists and object literals in JavaScript
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
vara="ape",
b="bat",
c="cat",
d="dog",
@fatihacet
fatihacet /pubsub-simple.js
CreatedOctober 15, 2011 22:02
Simple PubSub implementation with JavaScript - taken from Addy Osmani's design patterns book -
varpubsub={};
(function(q){
vartopics={},subUid=-1;
q.subscribe=function(topic,func){
if(!topics[topic]){
topics[topic]=[];
}
vartoken=(++subUid).toString();
topics[topic].push({
token:token,
@thennothinghappened
thennothinghappened /EventEmitter.gml
Last activeDecember 17, 2025 15:37
Basic EventEmitter for GameMaker
/*
MIT License
Copyright (c) 2025 orca / thennothinghappened
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@aamiaa
aamiaa /CompleteDiscordQuest.md
Last activeDecember 17, 2025 15:33
Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use thedesktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. PressCtrl+Shift+I to open DevTools
  3. Go to theConsole tab
  4. Paste the following code and hit enter:
@chrisl8888
chrisl8888 /bigdump.php
CreatedSeptember 5, 2013 13:25
BigDump: Staggered MySQL Dump Importer.Allows you to import large mysql dump files in a staggered way. Stolen from:http://www.ozerov.de/bigdump/ version 0.35
<?php
error_reporting(E_ALL);
// BigDump ver. 0.35b from 2012-12-26
// Staggered import of an large MySQL Dump (like phpMyAdmin 2.x Dump)
// Even through the webservers with hard runtime limit and those in safe mode
// Works fine with Internet Explorer 7.0 and Firefox 2.x
// Author: Alexey Ozerov (alexey at ozerov dot de)

This script allows you to view and spoof Discord quests (video, desktop, and activity quests).

Note

Use this only on your own account in the Discord PTB / Canary app. Spoofing quests may violate Discord’s TOS.


1. Install Discord PTB or Canary

@luismts
luismts /GitCommitBestPractices.md
Last activeDecember 17, 2025 15:26
Git Tips and Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong.With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@dainkaplan
dainkaplan /Ansi.java
Last activeDecember 17, 2025 15:23
Simple ANSI colors class for terminal code for JVM written in Scala and Java (two implementations)
packageorg.tempura.console.util;
importjava.util.ArrayList;
importjava.util.Collections;
importjava.util.List;
/**
*Usage:
* <li>Stringmsg =Ansi.Red.and(Ansi.BgYellow).format("Hello %s",name)</li>
* <li>Stringmsg =Ansi.Blink.colorize("BOOM!")</li>
NewerOlder

[8]ページ先頭

©2009-2025 Movatter.jp