Skip to content

Instantly share code, notes, and snippets.

@Arsenalist
Arsenalist / randon-tips.html
Created September 27, 2012 04:35
Display random tips using jQuery
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
</head>
<body>
<h1>Show Random Tip</h1>
<ul id="tips" style="display:none">
<li>Dinner is good for you.</li>
// #1 - Using a function
function Apple (country) {
this.country = country;
this.color = "red";
this.getInfo = getAppleInfo;
}
function getAppleInfo() {
return this.country + ' has ' + this.color + 'apples'.;
}
@Arsenalist
Arsenalist / check.php
Last active December 22, 2015 04:19
A PHP script to check whether the Mesut Ozil signing has been announced on the Arsenal.com RSS feed.
<?php
while (true) {
$contents = file_get_contents('http://feeds.arsenal.com/arsenal-news');
if (stripos($contents, 'mesut') !== FALSE) {
echo date(DATE_RFC822) . ": It's official!\n";
mail('PUTYOUREMAIL@HERE.COM', 'Arsenal signed Ozil', '');
exit(0);
} else {
echo date(DATE_RFC822) . ": Nothing doing.\n";
sleep(10);
<meta name="twitter:card" content="summary">
<meta name="twitter:domain" content="raptorsrepublic.com">
<meta name="twitter:url" content="http://www.raptorsrepublic.com/2013/10/09/practice-recap-valanciunas-english-cumulative-talent-ross-laid-back/">
<meta name="twitter:site" content="@raptorsrepublic">
<meta name="twitter:title" content="Practice Recap, Valanciunas&#8217; English, Cumulative Talent, Ross Laid Back? ">
<meta name="twitter:description" content="Recapping the practice, looking back at some wings and debating whether the current 'big three' is the best one we've had in years, and some Valanciunas and Ross talk, including a GIF or two."/>
<meta property="twitter:image" content="http://www.raptorsrepublic.com/wp-content/uploads/2013/02/ross.jpg"/>
<meta property="twitter:image:src" content="http://www.raptorsrepublic.com/wp-content/uploads/2013/02/ross.jpg"/>
zarar@zarar-ubuntu64:~/test$ ls
sports-scraper.zip
zarar@zarar-ubuntu64:~/test$ unzip sports-scraper.zip
Archive: sports-scraper.zip
creating: sports-scraper/
creating: sports-scraper/lib/
inflating: sports-scraper/lib/sports-scraper.jar
inflating: sports-scraper/lib/jsoup-1.7.2.jar
inflating: sports-scraper/lib/commons-lang3-3.3.2.jar
creating: sports-scraper/bin/
ffmpeg -i old.mkv -c copy new.mp4
curl "https://ctc-customs.atlassian.net/rest/api/2/search" -H "Upgrade-Insecure-Requests: 1" -H "Cookie: mywork.tab.tasks=false; ISESSION=""6e5a049ac9b42e3e3d4738f7d5cdac8d64abeba9-xsrf=4cef945d51879c05db047ced5bfac6fc63210a91""; ondemand.signup.enabled=false; __atl_path=172.26.26.14.1441930664089256; studio.crowd.tokenkey=nf1hcjgYvsbdUkmXOtHYGA00; JSESSIONID=E2C90229F8C1DC81ABFBA1B06DCB0CFD; atlassian.xsrf.token=BE6K-ZQR5-NKNV-FREP|8081549e2d184997d9f4456a3a6cea6e3fcfd52b|lin" -H "Connection: keep-alive" -H "Content-Type: application/json" -X POST -d '{"jql": "issuetype = Story","startAt":0,"maxResults":1500,"fields":["id","key","summary","status.id","issuetype"]}'
Index: frontier/backendservice-parent/backendservice-common/src/main/java/com/frontier/exception/common/GlobalBEControllerExceptionHandler.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontier/backendservice-parent/backendservice-common/src/main/java/com/frontier/exception/common/GlobalBEControllerExceptionHandler.java (date 1509037066000)
+++ frontier/backendservice-parent/backendservice-common/src/main/java/com/frontier/exception/common/GlobalBEControllerExceptionHandler.java (revision )
@@ -125,7 +125,7 @@
private ErrorDto createDefaultErrorInfoObject(Exception exception) {
@Arsenalist
Arsenalist / example.ts
Created April 4, 2019 20:11
Sample bad code
// EXAMPLE 1
class Appliance {
name: string;
constructor(name: string){
this.name = name;
}
getName() {
return this.name;
}
@Arsenalist
Arsenalist / adr-suggest.md
Last active June 30, 2026 16:29
adr-suggest.md
name adr-suggest
description Proactively offer to draft an Architecture Decision Record (ADR) when the conversation reaches an architectural decision point. TRIGGER when the user (or you) is choosing between alternatives ("X vs Y", "go with A or B"), switching away from an established approach ("replace X with Y", "deprecate X"), adding/removing a major dependency (mix.exs, npm, system service), introducing a new core abstraction (new context module, new CQRS aggregate, new behaviour), defining a cross-cutting convention ("from now on we always..."), or revisiting a previously made architectural choice. SKIP for bug fixes, UI styling, behavior-preserving refactors, test-only changes, copy edits, or work that follows an already-documented convention.

ADR Auto-Suggest

You've been activated because the conversation has the shape of an architectural decision. Your job is not to write the ADR yourself — it is to recognise the moment and steer the user toward the /adr slash command, which owns t