Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 04:34
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@DimazzzZ
DimazzzZ / iso-639-1-codes.php
Last active April 27, 2024 04:34 — forked from ddebin/iso_array_lang.php
ISO 639-1 language codes array
<?php
$codes = [
'ab' => 'Abkhazian',
'aa' => 'Afar',
'af' => 'Afrikaans',
'ak' => 'Akan',
'sq' => 'Albanian',
'am' => 'Amharic',
'ar' => 'Arabic',
@Hirrolot
Hirrolot / tagless-final.rs
Last active April 27, 2024 04:30
Tagless-final encoding of a simple arithmetic language in Rust
trait Interp {
type Repr<T>;
fn lit(i: i32) -> Self::Repr<i32>;
fn add(a: Self::Repr<i32>, b: Self::Repr<i32>) -> Self::Repr<i32>;
}
struct Eval;
impl Interp for Eval {
@ww9
ww9 / one-line-text-art-and-emojis_utf8_ascii.txt
Last active April 27, 2024 04:27
Emojis, UTF8, ASCII (one line) #misc
# Collection of one line text art (◕‿◕✿)
Collection of emojis and one line text art like (╯°□°)╯︵ ┻━┻ 🤗
ּבּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
{
"manifest_version": 2,
"name": "Chrome Socket API Server",
"description": "listen & accept for socket",
"version": "0.1",
"app": {
"background": {
"scripts": ["server.js"]
}
},
@0xjjpa
0xjjpa / mobile.html
Created February 3, 2014 15:08
Meta tag for designing on a 640px mobile screen, targeting the font to then match it unless it's an ipad.
<meta id="viewport" name="viewport" content="width=320, intial-scale=0.5, maximum-scale=.5, minimum-scale=.5, user-scalable=no"/>
<script>
(function(doc) {
if (navigator.userAgent.match(/iPad/i)) {
doc.getElementById("viewport").setAttribute("content", "initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no");
}
}(document));
</script>
@0xjjpa
0xjjpa / mediaqueries.scss
Created November 28, 2013 12:54
Media Query Sass Recipe
$break-small: 480px;
$break-large: 1024px;
@mixin media-query-for($device) {
@if $device == palm {
@media only screen and (max-width: $break-small) { @content; }
}
@else if $device == lap {
@media only screen and (min-width: $break-small + 1) and (max-width: $break-large - 1) { @content; }
}
@0xjjpa
0xjjpa / typography.css
Created February 2, 2014 17:13
Modern scale for typography
/* Read article at http://typecast.com/blog/a-more-modern-scale-for-web-typography */
body {
font-size: 100%;
}
body, caption, th, td, input, textarea, select, option, legend, fieldset, h1, h2, h3, h4, h5, h6 {
font-size-adjust: 0.5;
}
#page {