Skip to content

Instantly share code, notes, and snippets.

View sebastiancichos's full-sized avatar

Sebastian Cichos sebastiancichos

View GitHub Profile
@kevinSuttle
kevinSuttle / meta-tags.md
Last active July 10, 2024 09:39 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@romaricdrigon
romaricdrigon / formController.js
Created August 21, 2013 07:46
Using AngularJS on Symfony2 forms
// An example controller binded to the form
function FormCntl($scope, $compile) {
// Consider using FosJsRouting bundle, if you want to use a Symfony2 route
$scope.formUrl = "http://url-to-fetch-my-form";
// Data from the form will be binded here
$scope.data = {};
// Method called when submitting the form
$scope.submit = function() {
@e-river
e-river / gulpfile.js
Last active January 2, 2016 11:19
gulpfile.js using gulp-ruby-sass, gulp-autoprefixer, gulp.spritesmith, gulp-jade, gulp-less, gulp-minify-css, gulp-concat and gulp-uglify, gulp-watch, gulp-plumber, gulp-clean.
var gulp = require('gulp')
, concat = require('gulp-concat')
, uglify = require('gulp-uglify')
, watch = require('gulp-watch')
, sass = require('gulp-ruby-sass')
, autoprefixer = require('gulp-autoprefixer')
, spritesmith = require("gulp.spritesmith")
, minifyCSS = require('gulp-minify-css')
, plumber = require('gulp-plumber')
, jade = require('gulp-jade')
@valichek
valichek / bundle.js
Created May 28, 2015 11:43
jspm bundle task for gulp
var gulp = require('gulp');
var paths = require('../paths');
var jspm = require('jspm/api');
gulp.task('bundle', function (done) {
jspm.bundle(
[
'*',
'aurelia-skeleton-navigation/*',
'aurelia-bootstrapper',
@probonopd
probonopd / mosquitto-on-uberspace.txt
Last active June 2, 2019 03:56
mosquitto MQTT on uberspace
# Make a directory
mkdir ~/mosquitto
cd ~/mosquitto
# Get mosquitto for CentOS 6 and locally unpack it
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/oojah:/mqtt/RedHat_RHEL-6/x86_64/mosquitto-1.2-6.1.x86_64.rpm
rpm2cpio mosquitto-*.rpm | cpio -idmv
mosquitto-*.rpm
# Set up ~/service on uberspace
@srph
srph / oauth.js
Created February 21, 2016 13:50
axios: interceptor which includes your oauth token in every request as an Authorization header
import axios from 'axios';
// You can use any cookie library or whatever
// library to access your client storage.
import cookie from 'cookie-machine';
axios.interceptors.request.use(function(config) {
const token = cookie.get(__TOKEN_KEY__);
if ( token != null ) {
config.headers.Authorization = `Bearer ${token}`;
@ziluvatar
ziluvatar / token-generator.js
Last active July 16, 2024 14:46
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');
@mayank-shekhar
mayank-shekhar / Rename Package Name in React Native
Created February 16, 2018 07:28
Rename App ID and Package name for a React Native App.
For Android:
Manually change it in android/app/src/main/java/com/PROJECT_NAME/MainActivity.java:
package MY.APP.ID;
In android/app/src/main/java/com/PROJECT_NAME/MainApplication.java:
package MY.APP.ID;
In android/app/src/main/AndroidManifest.xml:
package="MY.APP.ID"

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

@youjunjer
youjunjer / gist:b20f63fcf909862c7943dd955583916e
Last active September 5, 2020 19:48
ESP32-CAM Stream server, auto takepic and OTA
//Change Tools/Partition/Scheme to Minimal SPIFFS (Large APPS with OTA)
//IR sensor set at GPIO13
//Must Insert SD card
#include "esp_camera.h"
#include <WiFi.h>
#include "esp_timer.h"
#include "img_converters.h"
#include "Arduino.h"
#include "fb_gfx.h"