Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View axsuul's full-sized avatar

James Hu axsuul

View GitHub Profile
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:d4:a1:79:94:00
inet 192.168.2.110 netmask 0xffffff00 broadcast 192.168.2.255
nd6 options=1<PERFORMNUD>
groups: bridge
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: epair3a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 8 priority 128 path cost 2000
@axsuul
axsuul / controllers.application.js
Created February 27, 2018 01:46 — forked from samselikoff/mirage.config.js
Mirage dev boilerplate
import Ember from 'ember';
export default Ember.Controller.extend({
});
@axsuul
axsuul / README-Template.md
Created January 7, 2018 22:34 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

class Front
def initialize
@username = Rails.application.secrets.front_login
@password = Rails.application.secrets.front_password
end
def update_contact(attributes = {})
attributes.symbolize_keys!
attributes.reverse_merge!(
name: nil,
[coupon text="what"]
[
{ "keys": ["super+h"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["super+l"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["super+k"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["super+j"], "command": "move", "args": {"by": "lines", "forward": true} },
{ "keys": ["super+shift+h"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true} },
{ "keys": ["super+shift+l"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true} },
{ "keys": ["super+shift+k"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true} },
{ "keys": ["super+shift+j"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true} },
I, [2014-01-07T15:37:37.118523 #19797] INFO -- : executing ["/srv/rails/current/bin/unicorn", "-c", "/srv/rails/current/config/unicorn.rb", {12=>#<Kgio::UNIXServer:fd 12>}] (in /srv/rails/releases/20140107091945)
I, [2014-01-07T15:37:37.118983 #19797] INFO -- : forked child re-executing...
I, [2014-01-07T15:37:38.998632 #19797] INFO -- : inherited addr=/srv/rails/shared/sockets/unicorn.sock fd=12
I, [2014-01-07T15:37:38.999038 #19797] INFO -- : Refreshing Gem list
I, [2014-01-07T15:37:41.927794 #19967] INFO -- : Refreshing Gem list
/srv/rails/shared/bundle/ruby/2.0.0/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:219:in `pid=': Already running on PID:19967 (or pid=/srv/rails/shared/pids/unicorn.pid is stale) (ArgumentError)
from /srv/rails/shared/bundle/ruby/2.0.0/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:151:in `start'
from /srv/rails/shared/bundle/ruby/2.0.0/gems/unicorn-4.7.0/bin/unicorn:126:in `<top (required)>'
from /srv/rails/current/bin/unicorn:16:in `load'
from
@axsuul
axsuul / gist:6924664
Last active December 25, 2015 05:29 — forked from phoet/gist:6916641
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', '4.0.0'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
namespace :db do
namespace :seed do
desc "Adaug medici in baza de date"
task :medici => :environment do
Medic.create!(:nume => "Serafinceanu", :prenume => "Cristian", :cod_parafa => "282828")
Medic.create!(:nume => "Craciun", :prenume =>"Anne-Marie", :cod_parafa =>"999")
end
end
end
@axsuul
axsuul / hanman.py
Created September 10, 2012 02:58
hangman
#Hangman
import random
words = ["apple", "banana", "pen", "cat", "dog", "bee", "pig"]
print "Welcome to the Hangman game. You will have six chances to guss my secret word correctly. Good luck!"
word = words[random.randint(0,len(words)-1)]
def dash(word):
list = []
for i in word:
list.append("_")