Skip to content

Instantly share code, notes, and snippets.

Avatar
🐝
b

Samuel Toriel riltsken

🐝
b
View GitHub Profile
@riltsken
riltsken / test.js
Last active Sep 27, 2017
async/await testing with promise.all
View test.js
/*
* Theory: Does async/await block / become synchronous in promise.all where map itself contains async/await function
* Conclusion: No it does not.
*/
function ordered(num) {
let start = new Date();
return new Promise((resolve, reject) => {
setTimeout(() => {
console.log(`Time elapsed for ${num}`, new Date() - start);
return resolve(num)
View gist:84004a3b6964823e3ae6
#!/usr/bin/env python
import base64
import json
import os
import re
import yaml
YAML_CONFIG_FILE = os.environ.get('APPLICATION_CONFIG')
with open(YAML_CONFIG_FILE, 'r') as YAML_CONFIG:
View keybase.md

Keybase proof

I hereby claim:

  • I am riltsken on github.
  • I am riltsken (https://keybase.io/riltsken) on keybase.
  • I have a public key whose fingerprint is 4EC1 9EB2 C366 FD2A 66CB EB35 B6D4 A3F5 871B F8E5

To claim this, I am signing this object:

View cache.sh
#!/bin/sh
DOWNLOAD_CACHE=vendor/pypi
npm rebuild
pip install --no-index --find-links=$DOWNLOAD_CACHE Cython
pip install --no-index --find-links=$DOWNLOAD_CACHE -r pip-requirements.txt
@riltsken
riltsken / 0_reuse_code.js
Created Nov 8, 2013
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View gist:6637219
Putting temporary build files in /home/samuel/work/test_env/ipaddress and source/develop files in /home/samuel/work/test_env/src-bundle
Downloading/unpacking ipaddress==1.0.3
Downloading ipaddress-1.0.3.tar.gz
Running setup.py egg_info for package ipaddress
Running setup.py egg_info for package ipaddress
Exception:
Traceback (most recent call last):
File "/home/samuel/work/test_env/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
View gist:4067568
python-mysqldb:
Installed: 1.2.2-10build1
Candidate: 1.2.2-10build1
Version table:
*** 1.2.2-10build1 0
500 http://us.archive.ubuntu.com/ubuntu/ lucid/main Packages
100 /var/lib/dpkg/status
@riltsken
riltsken / gist:3949642
Created Oct 24, 2012
googlebot + emovolution wishing me happy birthday
View gist:3949642
Traceback (most recent call last):
File "/home/live/env/emo/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/live/sites/emo/../emo/journal/views.py", line 195, in summary
'searchform': searchform}, context_instance=RequestContext(request))
File "/home/live/env/emo/lib/python2.6/site-packages/django/shortcuts/__init__.py", line 20, in render_to_response
return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
View gist:3439729
{
'date':[
'Thu, 23 Aug 2012 18:08:14 GMT'
],
'content-encoding':[
''
],
'content-type':[
'application/octet-stream'
],
View gist:3106136
samuel@samuel-Latitude-E6510:~/work/reach/reach/qetest/pinot/lbaas/spec$ rspec load_balancer_smoke_test.rb
/home/samuel/.rvm/gems/ruby-1.9.3-p125/gems/typhoeus-0.4.2/lib/typhoeus/curl.rb:447: [BUG] Segmentation fault
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0036 p:---- s:0133 b:0133 l:000132 d:000132 CFUNC :global_init
c:0035 p:0030 s:0129 b:0129 l:000123 d:000128 BLOCK /home/samuel/.rvm/gems/ruby-1.9.3-p125/gems/typhoeus-0.4.2/lib/typhoeus/curl.rb:447
You can’t perform that action at this time.