Skip to content

Instantly share code, notes, and snippets.

arief nur andono goldalworming

Block or report user

Report or block goldalworming

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Jarvis.py
import speech_recognition
import pyttsx
speech_engine = pyttsx.init('sapi5') # see http://pyttsx.readthedocs.org/en/latest/engine.html#pyttsx.init
speech_engine.setProperty('rate', 150)
def speak(text):
speech_engine.say(text)
speech_engine.runAndWait()
@sveetch
sveetch / casperjs_authenticator.js
Created Jan 19, 2016
CasperJS script to authenticate and store persistent cookie through profile for SlimerJS
View casperjs_authenticator.js
/*
*
* This is a CasperJS script.
*
* It try to authenticate so the session cookie can be stored in current profile
* and then BackstopJS+CasperJS+SlimerJS can use the same cookie during tests.
*
* Scenario
* ========
*
@kosiara
kosiara / setup_howto.txt
Last active Apr 21, 2017
Setup Facebook React-native sample (empty) project on Ubuntu
View setup_howto.txt
# author:
# @Bartosz Kosarzycki
#
sudo apt-get install npm
sudo npm install -g react-native-cli
sudo ln -s /usr/bin/nodejs /usr/bin/node
cd /home/user/your/project/path
react-native init AwesomeProject
cd AwesomeProject
@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active Sep 20, 2019
How to view-source of a Chrome extension
View how-to-view-source-of-chrome-extension.md

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@harlow
harlow / golang_job_queue.md
Last active Sep 20, 2019
Job queues in Golang
View golang_job_queue.md
@sergiotapia
sergiotapia / md5-example.go
Last active Sep 19, 2019
Golang - How to hash a string using MD5.
View md5-example.go
import (
"crypto/md5"
"encoding/hex"
)
func GetMD5Hash(text string) string {
hasher := md5.New()
hasher.Write([]byte(text))
return hex.EncodeToString(hasher.Sum(nil))
}
View selenium-webdriver-cheatsheet.md

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
    
  • Go to a specified URL
@chrishamant
chrishamant / s3_multipart_upload.py
Created Jan 3, 2012
Example of Parallelized Multipart upload using boto
View s3_multipart_upload.py
#!/usr/bin/env python
"""Split large file into multiple pieces for upload to S3.
S3 only supports 5Gb files for uploading directly, so for larger CloudBioLinux
box images we need to use boto's multipart file support.
This parallelizes the task over available cores using multiprocessing.
Usage:
s3_multipart_upload.py <file_to_transfer> <bucket_name> [<s3_key_name>]
@nephics
nephics / client.py
Created Aug 9, 2011
Test of experimental Tornado feature for a streaming request body handler
View client.py
#
# Test of experimental Tornado feature for a streaming request body handler, see
# https://github.com/nephics/tornado/commit/1bd964488926aac9ef6b52170d5bec76b36df8a6
#
#
# Client sending file to server
#
import tornado.httpclient as httpclient
@karmi
karmi / tophashes-sliding-window-redis.sh
Created Dec 7, 2010
Desigining "trending topics in 24 hours sliding window" with Redis
View tophashes-sliding-window-redis.sh
# ------------------------------------------------------------------
# Desigining "trending topics in 24 hours sliding window" with Redis
# ------------------------------------------------------------------
redis-cli del tophashes:2010-12-07-08-00
redis-cli del tophashes:2010-12-07-09-00
redis-cli del tophashes:current
echo '=== 8:00 AM ==='
You can’t perform that action at this time.