Skip to content

Instantly share code, notes, and snippets.

View chaadow's full-sized avatar
🎯
Focusing

Chedli Bourguiba chaadow

🎯
Focusing
View GitHub Profile
@wrought
wrought / wordlists.html
Created October 21, 2013 22:02
Links to some word lists
<a name="resources">Resources used in compiling this wordlist</a></h2><a name="resources">
</a><ul><a name="resources">
</a><li><a name="resources"></a><a href="http://www.dcs.shef.ac.uk/research/ilash/Moby/">The Moby lexicon project</a> / Grady Ward <p>
</p></li><li><a href="http://ftp.digital.com/pub/misc/stolfi-wordlists/">The stolfi wordlists</a> / Jorge Stolfi and the original wordlist authors<br>
The wordlists in different languages were very useful in finding international words by intersection.<p>
</p></li><li><a href="ftp://ftp.ox.ac.uk/pub/wordlists">The wordlist collection at Oxford</a> / administered by Paul Leyland <p>
#!/usr/bin/env ruby
require 'JSON'
class LocationGetter
attr_reader :endpoint
def initialize(endpoint)
@endpoint = endpoint
end
@ershad
ershad / rack_attack.rb
Last active March 5, 2019 09:36
Rack::Attack sample configuration
class Rack::Attack
# By default, Rack::Attack uses `Rails.cache` to store requests information.
# It's configurable as follows -
#
# redis_client = Redis.connect(url: ENV["REDIS_URL"])
# Rack::Attack.cache.store = Rack::Attack::StoreProxy::RedisStoreProxy.new(redis_client)
class Request < ::Rack::Request
@uriannrima
uriannrima / Description.vue.js
Last active October 9, 2019 18:23
Mixin factory to create components with it's own vuex store module.
<template>
<div>
<div class="black-box rounded h-md-up">
<div>
<label>Description</label>
<minimize-button :minimize.sync="minimize"></minimize-button>
</div>
</div>
<div class="description-component" v-show="!minimize">
<div class="horizontal-container">
@alameenkhader
alameenkhader / rails-rpush.md
Last active August 28, 2020 09:10
Rpush/Rails Integration

###rpush - https://github.com/rpush/rpush

Follow the steps in rpush to add the gem to your rails project

####PushNotificationDevice

rails g model PushNotificationDevice device_type:integer:index device_token:string
class CreatePushNotificationDevices < ActiveRecord::Migration
$VERBOSE = nil
require File.expand_path('../rooby', __FILE__)
Person = Rooby::Class.new 'Person' do
define :initialize do |name|
@name = name
end
define :name do
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", github: "rails/rails"
@terryjray
terryjray / gist:3296171
Created August 8, 2012 15:55
Enabling hstore for new postgresql 9.1 and rails 3 install on ubuntu 12.04
RAILS_ENV=production rake db:setup
# produces the error below.....hmmm.....it's a no-worky
psql:/yourprojectpath/yourproject/db/structure.sql:29: ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/hstore.control": No such file or directory
# hstore postgresql extension needs to be installed, so....
sudo apt-get install postgresql-contrib
# now your extension should be available to enable so log in with psql
psql -d yourproject_production -U yourdbuser -W
@HansMuller
HansMuller / system_back.dart
Last active February 14, 2022 20:49
Bottom navigation example with a Navigator per destination
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flutter code sample for NavigationBar with nested Navigator destinations.
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
class Destination {