This file contains 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
read -p "do you want to continue?" -n 1 -r | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
#do whatever you are checking on | |
fi |
This file contains 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
[[ $string != */ ]] && string="$string"/ |
This file contains 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
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.JLabel; | |
import java.awt.*; | |
import java.awt.event.*; | |
public class KeyLis{ | |
public static void main(String[] args){ | |
JFrame frame=new JFrame("Test Frame"); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
This file contains 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
/* | |
* @Author: Jeremiah Marks | |
* @Date: 2014-04-15 21:38:39 | |
* @Last Modified by: Jeremiah Marks | |
* @Last Modified time: 2014-04-17 21:04:19 | |
*/ | |
/* | |
################################################################################ | |
################################################################################ |
This file contains 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
source ~/.webanize.conf | |
newstring="START of STRING" | |
dbloc="url" | |
myfirstquery="SELECT dateadded,about FROM portfolio WHERE sourcecode LIKE '$dbloc'" | |
mysql --host=$hostname --user=$username --password=$pw -e "USE $dbname; $myfirstquery;" | while read -r line | |
do | |
newstring+=$line | |
done |
This file contains 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
AppName='xx000' | |
APIKey="somethingreallylong" | |
IdOfContactWithValidCreditCard=5795 | |
IdOfContactsCreditCard=167 | |
PayPlanId=0 #This is immediate AutoCharge... I think. It is in my application anyways | |
ProductIdsSold=[107] | |
SubscriptionIdsSold=[] | |
ProcessSpecials=True | |
PromoCodes=["apitest"] | |
LeadAffiliateID=0 #is equivalent to not having an Affiliate |
This file contains 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 getContactsWithCards(self): | |
records=[] | |
p=0 | |
while True: | |
listOfDicts = self.connection.DataService.query(self.infusionsoftAPIKey, 'CreditCard', 1000,p,{},['Id', 'ContactId', 'Email','FirstName', 'LastName', 'Last4'], 'Id', True) | |
for each in listOfDicts: | |
interestingData=["Id", 'ContactId', 'Email','FirstName', 'LastName', 'Last4'] | |
for eachbit in interestingData: | |
if not each.has_key(eachbit): |
This file contains 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
##from http://www.geeksforgeeks.org/check-number-fibonacci-number/ | |
def isPerfSquare(x): | |
return(int(x**(0.5))**2==x) | |
def isFib(x): | |
return (isPerfSquare(5*x*x+4) or isPerfSquare(5*x*x-4)) | |
This file contains 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
144 | |
1 1 | |
1 934547091 | |
25 5 | |
25 1494320997 | |
3 0 | |
3 623690081 | |
12 0 | |
12 476190629 | |
44 0 |
This file contains 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 bash | |
dig +short myip.opendns.com @resolver1.opendns.com |
OlderNewer