Giter Site home page Giter Site logo

socode's Introduction

Hugo template for Netlify CMS with Netlify Identity

This is a small business template built with Victor Hugo and Netlify CMS, designed and developed by Darin Dimitroff, spacefarm.digital.

Getting started

Use our deploy button to get your own copy of the repository.

Deploy to Netlify

This will setup everything needed for running the CMS:

  • A new repository in your GitHub account with the code
  • Full Continuous Deployment to Netlify's global CDN network
  • Control users and access with Netlify Identity
  • Manage content with Netlify CMS

Once the initial build finishes, you can invite yourself as a user. Go to the Identity tab in your new site, click "Invite" and send yourself an invite.

Now you're all set, and you can start editing content!

Local Development

Clone this repository, and run yarn or npm install from the new folder to install all required dependencies.

Then start the development server with yarn start or npm start.

Layouts

The template is based on small, content-agnostic partials that can be mixed and matched. The pre-built pages showcase just a few of the possible combinations. Refer to the site/layouts/partials folder for all available partials.

Use Hugo’s dict functionality to feed content into partials and avoid repeating yourself and creating discrepancies.

CSS

The template uses a custom fork of Tachyons and PostCSS with cssnext and cssnano. To customize the template for your brand, refer to src/css/imports/_variables.css where most of the important global variables like colors and spacing are stored.

SVG

All SVG icons stored in site/static/img/icons are automatically optimized with SVGO (gulp-svgmin) and concatenated into a single SVG sprite stored as a a partial called svg.html. Make sure you use consistent icons in terms of viewport and art direction for optimal results. Refer to an SVG via the <use> tag like so:

<svg width="16px" height="16px" class="db">
  <use xlink:href="#SVG-ID"></use>
</svg>

socode's People

Contributors

antonaut avatar ashleymiller avatar binary132 avatar cjwelborn avatar daniel-dressler avatar generalzero avatar hako avatar henghonglee avatar hklebs avatar icio avatar jessealdridge avatar jpadilla avatar markembling avatar nathanathan avatar pocon avatar pretzilz avatar rafkhan avatar rburgosnavas avatar rixx avatar samlabs821 avatar satshabad avatar sente avatar seripap avatar spratt avatar sricola avatar uiri avatar umurgdk avatar vitovan avatar wmill avatar zgohr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

socode's Issues

3boll function

the function of 3boll won't work since python doesn't like functionnames beginning with numbers

(Occasional) error in hmason()

Traceback (most recent call last):
  File "socode.py", line 1919, in <module>
    hmason()
  File "socode.py", line 228, in hmason
    exec random.choice(re.findall('def (.*):', socode_source))
  File "<string>", line 1, in <module>
  File "socode.py", line 830, in GeneralZero
    if inspect.isfunction(obj)])()
TypeError: nathanathan() takes at least 1 argument (0 given)

It is because this method picks out a random method from the socode.py file, and executes it. The problem is that it executes it without any args, and if it picks up a method that requires args, you get the above exception.

Use of Third-Party Packages

Are third-party packages outside of Python's standard library permitted? Like anything from PyPi. Do they fall under the "anything and everything" in rule 2? I have an idea that uses BeautifulSoup but want to double check first.

TypeError: 'instancemethod' object has no attribute '__getitem__'

print 'Hello World! :)'
Long live Aaron Swartz!
Let's see that again...
I don't know Python; I don't belong here
We're no strangers to love
You Know the rules and so do I
A full commitment's what I'm thinking of
You wouldn't get this from any other guy
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up.
Never gonna let you down.
Never gonna run around.
And desert you.
Never gonna make you cry,
Never gonna say goodbye,
Never gonna tell a lie and hurt you.
Created new window in existing browser session.
Traceback (most recent call last):
File "./socode.py", line 1037, in
jpadilla()
File "./socode.py", line 482, in jpadilla
print 'Forked {} times'.format(repo['forks_count'])
TypeError: 'instancemethod' object has no attribute 'getitem'

Can't call json() on the request object?

in function jpadilla, I get an error that json is just a regular dict...
Perhaps:

 repo = requests.get('https://api.github.com/repos/sricola/socode').json

Would work better?

Error in starefossen()

Traceback (most recent call last):
  File "socode.py", line 1926, in <module>
    starefossen()
  File "socode.py", line 407, in starefossen
    print requests.get('http://kdd2.1337fire.com/').content
  File "C:\Users\Havan\Anaconda2\lib\site-packages\requests\api.py", line 70, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Users\Havan\Anaconda2\lib\site-packages\requests\api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\Havan\Anaconda2\lib\site-packages\requests\sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Havan\Anaconda2\lib\site-packages\requests\sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\Havan\Anaconda2\lib\site-packages\requests\adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='kdd2.1337fire.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x00000000034EEB38>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))

Looks like the kdd2.1337fire.com site is no longer active.

else if

python socode.py
File "socode.py", line 92
else if m > 0 and n == 0:
^
SyntaxError: invalid syntax
mike@sunshine ~/temp/foo/socod

TypeError

Traceback (most recent call last):
File "socode.py", line 1261, in
jpadilla()
File "socode.py", line 401, in new_f
ret_val = f(_args, *_kwargs)
File "socode.py", line 523, in jpadilla
print 'Forked {} times'.format(repo['forks_count'])
TypeError: 'instancemethod' object has no attribute 'getitem'

Can't Run

Current master can't be ran. Do the goal of this repo to have everyone push without noticing if it is valid code?

Tab vs. Space

Tab or space? 2 spaces or 4 spaces? I see inconsistent indentation in the code.

Please call my function

I implemented a very nice voting function that nobody else used. So, I put a bounty on it that the next person to merge a pull request calling it can claim.

Error in jpadilla()

Traceback (most recent call last):
  File "socode.py", line 1943, in <module>
    jpadilla()
  File "socode.py", line 806, in jpadilla
    print 'Forked {} times'.format(repo['forks_count'])
TypeError: 'instancemethod' object has no attribute '__getitem__'

It's because of this line of code
repo = requests.get('https://api.github.com/repos/sricola/socode').json
which should probably be
repo = requests.get('https://api.github.com/repos/sricola/socode').json()

Similar issue in ncammarata()
tweets = requests.get("https://search.twitter.com/search.json?q=a").json

Error in zgohr() (and subsequently in kisom())

Traceback (most recent call last):
  File "socode.py", line 1952, in <module>
    kisom()
  File "socode.py", line 645, in new_f
    ret_val = f(*args, **kwargs)
  File "socode.py", line 536, in kisom
    zgohr(geoip['city'])
  File "socode.py", line 645, in new_f
    ret_val = f(*args, **kwargs)
  File "socode.py", line 526, in zgohr
    '/data/2.1/find/name?q=%s' % city).content)
  File "C:\Users\Havan\Anaconda2\lib\json\__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Havan\Anaconda2\lib\json\decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Havan\Anaconda2\lib\json\decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

The underlying issue is in zgohr(), probably because the http://api.openweathermap.org API requires an API key, which has not been provided in the URL request.

Too fast!

Sorry guys I tried manually merging even one guy's commit and the head moved too fast for even that!

Error!

After the Deleting home/dani... Just kidding there's an error

Traceback (most recent call last):
  File "projects/socode.py", line 1305, in <module>
    rjwebb(5)
  File "projects/socode.py", line 148, in rjwebb
    r = get_user_page(user)
  File "projects/socode.py", line 134, in get_user_page
    return urllib2.urlopen(gh_url).read()
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 410: Gone

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.