Skip to content

Instantly share code, notes, and snippets.

View seyyah's full-sized avatar

seyyah seyyah

View GitHub Profile
@charset "UTF-8";
@font-face {
font-family: "feather";
src: ~"url('@{icon-font-path}feather-webfont.eot')";
src: ~"url('@{icon-font-path}feather-webfont.eot?#iefix') format('embedded-opentype')",
~"url('@{icon-font-path}feather-webfont.woff') format('woff')",
~"url('@{icon-font-path}feather-webfont.ttf') format('truetype')",
~"url('@{icon-font-path}feather-webfont.svg#featherregular') format('svg')";
font-weight: normal;
@seyyah
seyyah / porteus_kiosk.log
Last active May 18, 2017 06:29 — forked from anonymous/porteus_kiosk.log
Acer One 10 Porteus Kiosk Debug Log Messages. ISO: Porteus Kiosk 3.7.0-i586; VirtualBox 5.1.22r115126 (Qt5.6.2)
Please copy (Ctrl+a -> Ctrl+c) and send this report to [email protected] in case of hardware/software/configuration issues.
KIOSK SIGNATURE:
U2FsdGVkX1+HaCn0EATrsfHyndMqHxNWNt43C5DvRYgNdmeNIiH1yjCAv+3LZfEL
Te+lohopPizSxtifEQoq4iwRULt3k98UZyfZTg5ju533f2KEO2aZZ4ekgtDrzEFH
nWMu8z7G8zikJeeUe6l26HR0XQKoapLXckag5dk17b2Zexr3LSTXferSysDnu/pZ
yZOZEJwJrxG4gPSfb9jhTkZ7FTiwO35DQlIxhPkwvsg1T3k4WbP2H0FUihApzdLh
Tes8bFtg25s950uHLKoMvYKSF3k9CizCli7O1Kk7Uw4orBJgAy6fuQWi6MnjMf28
nEiVBR30yssa3xBIBvgWyu6qoYULATNqpnrEUnpdHcMmsv1OIhw603NZqnvwB5hj
@seyyah
seyyah / Gruntfile.coffee
Created January 23, 2017 05:47 — forked from naps62/Gruntfile.coffee
quick Grunt.js setup with Sass + Coffee + Slim
module.exports = (grunt) ->
# configuration
grunt.initConfig
# grunt sass
sass:
compile:
options:
style: 'expanded'
@seyyah
seyyah / qemu-system-raspberry.sh
Created December 8, 2016 11:01 — forked from FrankSpierings/qemu-system-raspberry.sh
Run Raspberry Pi in qemu-system-arm using versatilepb 'hardware'
#!/bin/sh
#https://github.com/dhruvvyas90/qemu-rpi-kernel/raw/master/kernel-qemu-4.4.13-jessie
KERNEL=kernel-qemu-4.4.13-jessie
#https://downloads.raspberrypi.org/raspbian_lite_latest + https://github.com/dhruvvyas90/qemu-rpi-kernel/wiki/Emulating-Jessie-image-with-4.x.xx-kernel
IMAGE=2016-05-27-raspbian-jessie-lite.img
export QEMU_AUDIO_DRV="none"
qemu-system-arm -kernel ${KERNEL} \
-cpu arm1176 \
-m 256 \
-M versatilepb \
@seyyah
seyyah / sessions_and_conversations.markdown
Last active December 5, 2016 07:13 — forked from jcasimir/sessions_and_conversations.markdown
Sessions and Conversations in Rails 3

Sessions and Conversations

HTTP is a stateless protocol. Sessions allow us to chain multiple requests together into a conversation between client and server.

Sessions should be an option of last resort. If there's no where else that the data can possibly go to achieve the desired functionality, only then should it be stored in the session. Sessions can be vulnerable to security threats from third parties, malicious users, and can cause scaling problems.

That doesn't mean we can't use sessions, but we should only use them where necessary.

Adding, Accessing, and Removing Data

class ApplicationController < ActionController::Base
include Pundit
# Verify that controller actions are authorized. Optional, but good.
after_filter :verify_authorized, except: :index
after_filter :verify_policy_scoped, only: :index
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized
private

Intro

The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

DNS

Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.

Different Operating Systems

@seyyah
seyyah / attachment.rb
Last active October 14, 2015 07:23 — forked from madwork/attachment.rb
class Attachment < ActiveRecord::Base
mount_uploader :attachment, AttachmentUploader
# Associations
belongs_to :attached_item, polymorphic: true
# Validations
validates_presence_of :attachment
@seyyah
seyyah / my.cnf
Last active August 29, 2015 14:09 — forked from roktas/my.cnf
[mysqld]
# ----------------------------------------------------------------------
# UTF-8 temiz bir mysql için ilgili yapılandırma
# ----------------------------------------------------------------------
init_connect=’SET collation_connection = utf8_general_ci’
init_connect=’SET NAMES utf8′
character-set-server=utf8
collation-server=utf8_general_ci
@seyyah
seyyah / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console