This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def insert_comma(mystring, position): | |
mystring[:position] + ',' + mystring[position:] | |
offset = 0 | |
for magic_number in magic_numbers: | |
position = magic_number + offset | |
mystring = insert_comma(mystring, position) | |
offset += 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright (c) 2005 nixCraft project <http://cyberciti.biz/fb/> | |
# This script is licensed under GNU GPL version 2.0 or above | |
# Source: http://www.cyberciti.biz/tips/move-mysql-users-privileges-grants-from-one-host-to-new-host.html | |
# Author Vivek Gite <[email protected]>, | |
# Peter Geil <[email protected]> | |
# ------------------------------------------------------------ | |
# SETME First - local mysql user/pass | |
_lusr="src-db-user" | |
_lpass="src-db-pw" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version 7.0 | |
if &cp | set nocp | endif | |
let s:cpo_save=&cpo | |
set cpo&vim | |
let &cpo=s:cpo_save | |
unlet s:cpo_save | |
set cscopeprg=/usr/bin/cscope | |
set cscopetag | |
set cscopeverbose | |
set fileencodings=utf-8,latin1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import tweepy #https://github.com/tweepy/tweepy | |
import csv | |
#Twitter API credentials | |
consumer_key = "" | |
consumer_secret = "" | |
access_key = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"created_at":"Thu Jul 21 09:11:50 +0000 2016","id":756054063439982593,"id_str":"756054063439982593","text":"RT @Mojahedineng: #Iran #News Merkel says no one wants prolonged period of Brexit limbo https://t.co/zFb8Wl8V3q https://t.co/vY7rMeqVzx","source":"<a href=\"https://mobile.twitter.com\" rel=\"nofollow\">Mobile Web (M2)</a>","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":2395606770,"id_str":"2395606770","name":"Esmail Abobakr","screen_name":"Esmail_Abobakr","location":"City of London, England","url":"http://mojahedin.org","description":"Human rights","protected":false,"verified":false,"followers_count":512,"friends_count":356,"listed_count":25,"favourites_count":0,"statuses_count":22910,"created_at":"Tue Mar 18 04:30:09 +0000 2014","utc_offset":null,"time_zone":null,"geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_col |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"contributors": null, | |
"text": "ツイッター動画投稿テスト http://t.co/y9hjEfABw1", | |
"geo": null, | |
"retweeted": false, | |
"in_reply_to_screen_name": null, | |
"possibly_sensitive": false, | |
"truncated": false, | |
"lang": "ja", | |
"entities": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an example resource file for rTorrent. Copy to | |
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to | |
# uncomment the options you wish to enable. | |
# Maximum and minimum number of peers to connect to per torrent. | |
min_peers = 1 | |
max_peers = 100 | |
# Same as above but for seeding completed torrents (-1 = same as downloading) |
NewerOlder