Skip to content

Instantly share code, notes, and snippets.

🍼
Family and buisness related projects. OS is on the low side atm

Tino Ehrich fightbulc

🍼
Family and buisness related projects. OS is on the low side atm
  • Big Pun Injections
  • Berlin, Germany
Block or report user

Report or block fightbulc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@remyvhw
remyvhw / semantic-ui-algolia.js
Last active Jun 22, 2018
Semantic UI & Algolia search
View semantic-ui-algolia.js
/*
Implementing Semantic UI and Algolia search can be a pain in the but if you're not use to deal with Semantic UI API stuff. This feels a little bit hackish but so far it works well enough; bonus for not needing the Algolia javascript client.
*/
var algolia = {
id: "Algolia app ID",
key: "Public key",
index: "Index name"
};
@discordier
discordier / gist:ed4b9cba14652e7212f5
Created Dec 4, 2014
options for phpStorm @noinspection annotation
View gist:ed4b9cba14652e7212f5
javascript
ES6ValidationInspection
JSAccessibilityCheckInspection
JSBitwiseOperatorUsageInspection
JSCheckFunctionSignaturesInspection
JSClosureCompilerSyntaxInspection
JSCommentMatchesSignatureInspection
JSComparisonWithNaNInspection
JSConsecutiveCommasInArrayLiteralInspection
@vdel26
vdel26 / nginx
Last active Sep 24, 2019
Openresty init.d script
View nginx
#!/bin/sh
#
# chkconfig: 2345 55 25
# Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx
# For Debian, run: update-rc.d -f nginx defaults
# For CentOS, run: chkconfig --add nginx
#
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
@h4cc
h4cc / satis_github_auth.sh
Created Nov 27, 2013
Some notes on how to authenticate with composer/satis against github oauth, so the rate limit of 60 will be raised op to 5000. Can also be used for travis-ci.
View satis_github_auth.sh
# Create a new Token
curl -u 'githubuser' -d '{"note":"Your Application"}' https://api.github.com/authorizations
# It is: "ebab4dc37e654bb230a9c69ebcd5f38e9a81e210"
#{
# "created_at": "2013-01-04T18:00:28Z",
# "app": {
# "url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api",
@Xeoncross
Xeoncross / ajax.js
Last active Oct 15, 2019
Simple, cross-browser Javascript POST/GET xhr request object. Supports request data and proper AJAX headers.
View ajax.js
/**
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object
*
* @param string url
* @param object callback
* @param mixed data
* @param null x
*/
function ajax(url, callback, data, x) {
try {
View pingdom.php
<?PHP
/**
* pingdom.php
*
* This application will check your server swap, hard drive, cpu, and MySQL conditions.
* It will then generate an appropriate XML file for a Pingdom HTTP Custom check.
*
* If any usage is above your preset thresholds, then a down message will be returned,
* indicating that your server may be under more load than usual, hopefully, providing
* a bit of advanced notice before a true failure due to lack of resources
@dciccale
dciccale / README.md
Last active May 22, 2018
Cross-browser triggerEvent function done with 127 bytes of JavaScript
View README.md

triggerEvent

Cross-browser function to trigger DOM events.

View ordinal.php
function ordinal($number) {
$ends = array('th','st','nd','rd','th','th','th','th','th','th');
$mod100 = $number % 100;
return $number . ($mod100 >= 11 && $mod100 <= 13 ? 'th' : $ends[$number % 10]);
}
@chrisjlee
chrisjlee / media-queries.scss
Last active Nov 11, 2019
All Media Queries breakpoints
View media-queries.scss
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
View gist:2597326

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
You can’t perform that action at this time.