Skip to content

Instantly share code, notes, and snippets.

Avatar
⌨️
coreloop

Andreas Pizsa AndreasPizsa

⌨️
coreloop
View GitHub Profile
View bigfarm.json
[
"<script type='text/javascript'>console.log('hello')</script>",
"https://gist.githubusercontent.com/AndreasPizsa/fa7433b5af9c7fe7bd73710a38617d56/raw/script.js",
"https://obamaself.com"
]
View subscriptions.json
{
"": {
"// you'll need images for all the `playerItems` below" : "",
"// just append the item id to `assetsBaseUrl`": "",
"assetsBaseUrl": "https://via.placeholder.com/150?",
"// URL for the language file.":"",
"languageUrl": "https://bigfarm-html5.goodgamestudios.com/languages/latest/de.json"
},
"payoutTypes": [{
View ApplicationMain.java
package com.goodgamestest;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.qmetric.spark.authentication.AuthenticationDetails;
import com.qmetric.spark.authentication.BasicAuthenticationFilter;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
View body.html
<h1>
Huhu, {{ name }}!
</h1>
<p>Diese Nachricht wurde wurde <b>automatisch</b> erstellt - alles, auch das PDF mit der Muster-Rechnung :)</p>
<p><span style="color: red">Was</span> <span style="color: green">sagst</span> Du <span style="color:blue">dazu</span>? :)</p>
View template.hbs
<html>
<head></head>
<body>
<h1>Hello, {{name}}</h1>
</body>
</html>
@AndreasPizsa
AndreasPizsa / works.ts
Created Nov 16, 2015
TS2 - lodash _.forEach
View works.ts
if (item.relations) {
item.relations.forEach((relation) => {
//
// ...
//
});
}
@AndreasPizsa
AndreasPizsa / parseWindowLocationQuery.js
Last active Nov 4, 2018
Parse URL query string in JavaScript
View parseWindowLocationQuery.js
/**
* sets window.location.query, which is a hash with all parameters
* param names are all lowercase
* reference as window.location.query.myparameter
*/
(function parseWindowLocationQuery(w){
var d=decodeURIComponent,
q=w.location.query=w.location.query||{},
pairs=w.location.search.substr(1).split('&'),
i;
@AndreasPizsa
AndreasPizsa / HTTP Errors
Created Dec 8, 2014
List of Restify HTTP and REST Error Exceptions
View HTTP Errors
100 restify.errors.ContinueError
101 restify.errors.SwitchingProtocolsError
102 restify.errors.ProcessingError
200 restify.errors.OKError
201 restify.errors.CreatedError
202 restify.errors.AcceptedError
203 restify.errors.Non-AuthoritativeInformationError
204 restify.errors.NoContentError
205 restify.errors.ResetContentError
206 restify.errors.PartialContentError
@AndreasPizsa
AndreasPizsa / gist:4eea7957553ed661c4df
Created Nov 7, 2014
Fix Bluetooth Audio hickups on Mac OS X
View gist:4eea7957553ed661c4df
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 48
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 40
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 48
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 53
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 48
defaults write com.apple.BluetoothAudioAgent "Stream – Flush Ring on Packet Drop (editable)" 30
defaults write com.apple.BluetoothAudioAgent "Stream – Max Outstanding Packets (editable)" 15
defaults write com.apple.BluetoothAudioAgent "Stream Resume Delay" "0.75"
You can’t perform that action at this time.